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.

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>
This commit is contained in:
Marek Vasut 2019-12-18 16:52:19 +01:00 committed by Patrick Delaunay
parent 541911f479
commit e71b9a64a2
2 changed files with 3 additions and 1 deletions

View 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;

View file

@ -30,3 +30,5 @@ u32 get_cpu_package(void);
/* return boot mode */
u32 get_bootmode(void);
int setup_mac_address(void);