diff options
author | Eugen Hristev <eugen.hristev@microchip.com> | 2019-10-09 09:23:43 +0000 |
---|---|---|
committer | Eugen Hristev <eugen.hristev@microchip.com> | 2019-10-24 13:01:57 +0300 |
commit | 522bac826e72f7c23af46b9b2d36cfa1379439e7 (patch) | |
tree | 0384154fde4008a8b1b6db91836a82f0f4418d66 /board | |
parent | 67fd5d85d1854929e4c0a153102d75f78f28e749 (diff) | |
download | u-boot-522bac826e72f7c23af46b9b2d36cfa1379439e7.tar.gz u-boot-522bac826e72f7c23af46b9b2d36cfa1379439e7.tar.xz u-boot-522bac826e72f7c23af46b9b2d36cfa1379439e7.zip |
board: sam9x60ek: add support for MAC address retrieval
Retrieve mac address from i2c eeprom at boot time.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/atmel/sam9x60ek/sam9x60ek.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/atmel/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c index 182b3aeed7..7be1dd54f4 100644 --- a/board/atmel/sam9x60ek/sam9x60ek.c +++ b/board/atmel/sam9x60ek/sam9x60ek.c @@ -106,6 +106,18 @@ int board_early_init_f(void) } #endif +#define MAC24AA_MAC_OFFSET 0xfa + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ +#ifdef CONFIG_I2C_EEPROM + at91_set_ethaddr(MAC24AA_MAC_OFFSET); +#endif + return 0; +} +#endif + int board_init(void) { /* address of boot parameters */ |