* [PATCH V2] ARM: stm32: Allow overriding setup_mac_address()
@ 2019-12-18 15:52 Marek Vasut
2020-01-09 13:55 ` Patrick DELAUNAY
2020-01-17 12:40 ` Patrick DELAUNAY
0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2019-12-18 15:52 UTC (permalink / raw)
To: u-boot
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>
---
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(-)
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index ed7d9f61dc..856c7ced7a 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -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;
diff --git a/arch/arm/mach-stm32mp/include/mach/sys_proto.h b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
index 99eefabf6e..47e57922d1 100644
--- a/arch/arm/mach-stm32mp/include/mach/sys_proto.h
+++ b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
@@ -30,3 +30,5 @@ u32 get_cpu_package(void);
/* return boot mode */
u32 get_bootmode(void);
+
+int setup_mac_address(void);
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH V2] ARM: stm32: Allow overriding setup_mac_address()
2019-12-18 15:52 [PATCH V2] ARM: stm32: Allow overriding setup_mac_address() Marek Vasut
@ 2020-01-09 13:55 ` Patrick DELAUNAY
2020-01-17 12:40 ` Patrick DELAUNAY
1 sibling, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2020-01-09 13:55 UTC (permalink / raw)
To: u-boot
Hi Marek,
> From: Marek Vasut <marex@denx.de>
> 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.
>
> 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>
Regards
Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH V2] ARM: stm32: Allow overriding setup_mac_address()
2019-12-18 15:52 [PATCH V2] ARM: stm32: Allow overriding setup_mac_address() Marek Vasut
2020-01-09 13:55 ` Patrick DELAUNAY
@ 2020-01-17 12:40 ` Patrick DELAUNAY
1 sibling, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2020-01-17 12:40 UTC (permalink / raw)
To: u-boot
Hi Marek,
> From: Marek Vasut <marex@denx.de>
> 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.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---
Applied to u-boot-stm32/master, thanks!
Regards
Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-17 12:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 15:52 [PATCH V2] ARM: stm32: Allow overriding setup_mac_address() Marek Vasut
2020-01-09 13:55 ` Patrick DELAUNAY
2020-01-17 12:40 ` Patrick DELAUNAY
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.