Skip to contentSkip to conversation

ARM: stm32: Allow overriding setup_mac_address()

PATCH New Marek Vasut 2 participants 3 messages Dec 18, 2019 – Jan 17, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: stm32: Allow overriding setup_mac_address()

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.

Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>

---
V2: Add prototype to sys_proto.h

---
 arch/arm/mach-stm32mp/cpu.c                    | 2 +-
 arch/arm/mach-stm32mp/include/mach/sys_proto.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-stm32mp/cpu.c +1 -1
index ed7d9f61dc..856c7ced7a 100644
@@ -449,7 +449,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;
arch/arm/mach-stm32mp/include/mach/sys_proto.h +2 -0
index 99eefabf6e..47e57922d1 100644
@@ -30,3 +30,5 @@ u32 get_cpu_package(void);
 
 /* return boot mode */
 u32 get_bootmode(void);
+
+int setup_mac_address(void);
Signature · 1 line
2.24.1
#1 lore raw

PATCH v2 1/1 ARM: stm32: Allow overriding setup_mac_address()

Hi Marek,

Quoted 9 lines

From: Marek Vasut <[email protected]>
Sent: mercredi 18 décembre 2019 16:52

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.

Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>

Regards
Patrick

#2 lore raw

PATCH v2 1/1 ARM: stm32: Allow overriding setup_mac_address()

In reply to Marek Vasut

Hi Marek,

Quoted 10 lines

From: Marek Vasut <[email protected]>
Sent: mercredi 18 décembre 2019 16:52

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.

Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>

---

Applied to u-boot-stm32/master, thanks!

Regards
Patrick