]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: phytec: common: k3: Making setup_mac_from_eeprom optional
authorJohn Ma <jma@phytec.com>
Wed, 13 Aug 2025 21:31:16 +0000 (14:31 -0700)
committerTom Rini <trini@konsulko.com>
Thu, 21 Aug 2025 16:02:49 +0000 (10:02 -0600)
Making the setup_mac_from_eeprom optional for boards without
CONFIG_PHYTEC_SOM_DETECTION_BLOCKS.

Signed-off-by: John Ma <jma@phytec.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
board/phytec/common/k3/board.c

index 7f34d71d5308ec8229868e0175384bbc6b7ce0bc..647f93a1d7a9913eb513deacb3e2108431a2c105 100644 (file)
@@ -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();