From fafa440342a50191504c1da7515ed6e28c933396 Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Fri, 1 Sep 2017 16:26:18 +0800 Subject: board: sama5d4_xplained: Set mac address from eeprom Add the code to set the ethernet mac address from eeprom by using the common code from the common folder. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- board/atmel/sama5d4_xplained/sama5d4_xplained.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'board') diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 854afcb6224..248a31b8c4f 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -192,6 +192,18 @@ int board_early_init_f(void) } #endif +#define AT24MAC_MAC_OFFSET 0x9a + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ +#ifdef CONFIG_I2C_EEPROM + at91_set_ethaddr(AT24MAC_MAC_OFFSET); +#endif + return 0; +} +#endif + int board_init(void) { /* adress of boot parameters */ -- cgit v1.2.3