]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: stm32: Allow overriding setup_mac_address()
authorMarek Vasut <marex@denx.de>
Wed, 18 Dec 2019 15:52:19 +0000 (16:52 +0100)
committerPatrick Delaunay <patrick.delaunay@st.com>
Fri, 17 Jan 2020 10:44:42 +0000 (11:44 +0100)
Let board code override setup_mac_address(), which is useful e.g. if the
board derives the MAC address from another source, like an I2C EEPROM.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
arch/arm/mach-stm32mp/cpu.c
arch/arm/mach-stm32mp/include/mach/sys_proto.h

index 6a71465494b39e3bd9d4a80500cb0f33a245a922..de7891b5c4a0c5354af9bf2bae7c55e4ecd3b102 100644 (file)
@@ -456,7 +456,7 @@ static void setup_boot_mode(void)
  * If there is no MAC address in the environment, then it will be initialized
  * (silently) from the value in the OTP.
  */
-static int setup_mac_address(void)
+__weak int setup_mac_address(void)
 {
 #if defined(CONFIG_NET)
        int ret;
index 99eefabf6eceb5685b67425807c44f422918a873..47e57922d1e4d6a1a0559215bb5583227670fde2 100644 (file)
@@ -30,3 +30,5 @@ u32 get_cpu_package(void);
 
 /* return boot mode */
 u32 get_bootmode(void);
+
+int setup_mac_address(void);