Skip to contentSkip to conversation

board: phytec: common: k3: Making setup_mac_from_eeprom optional

PATCH In review John Ma 3 participants 3 messages Aug 13, 2025 – Aug 21, 2025

lore
Share & tools
lore

John Ma

author
#0 lore raw

PATCH 1/1 board: phytec: common: k3: Making setup_mac_from_eeprom optional

Making the setup_mac_from_eeprom optional for boards without CONFIG_PHYTEC_SOM_DETECTION_BLOCKS.

---
 board/phytec/common/k3/board.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
board/phytec/common/k3/board.c +5 -2
index 7f34d71d530..647f93a1d7a 100644
@@ -176,6 +176,7 @@ static void boot_targets_setup(void)
 	env_set("boot_targets", boot_targets);
 }
 
+#if IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)
 static void setup_mac_from_eeprom(void)
 {
 	struct phytec_api3_element *block_element;
@@ -197,13 +198,15 @@ static void setup_mac_from_eeprom(void)
 		}
 	}
 }
+#endif
 
 int board_late_init(void)
 {
 	boot_targets_setup();
 
-	if (IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS))
-		setup_mac_from_eeprom();
+#if IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)
+	setup_mac_from_eeprom();
+#endif
 
 #if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
 	configure_capsule_updates();
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · John Ma

Making the setup_mac_from_eeprom optional for boards without CONFIG_PHYTEC_SOM_DETECTION_BLOCKS.

Quoted 34 lines
---
  board/phytec/common/k3/board.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
board/phytec/common/k3/board.c +5 -2
index 7f34d71d530..647f93a1d7a 100644
@@ -176,6 +176,7 @@ static void boot_targets_setup(void)
  	env_set("boot_targets", boot_targets);
  }
 
+#if IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)
  static void setup_mac_from_eeprom(void)
  {
  	struct phytec_api3_element *block_element;
@@ -197,13 +198,15 @@ static void setup_mac_from_eeprom(void)
  		}
  	}
  }
+#endif
 
  int board_late_init(void)
  {
  	boot_targets_setup();
 
-	if (IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS))
-		setup_mac_from_eeprom();
+#if IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)
+	setup_mac_from_eeprom();
+#endif
 
  #if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
  	configure_capsule_updates();
#2 lore raw
In reply to John Ma
Quoted 4 lines · John Ma

Making the setup_mac_from_eeprom optional for boards without CONFIG_PHYTEC_SOM_DETECTION_BLOCKS.

Applied to u-boot/next, thanks!

[1/1] board: phytec: common: k3: Making setup_mac_from_eeprom optional

      commit: 29ce50acbb40d64aabf789640a2866a9f71aefa6
Signature · 1 line
Tom