From bea3f28d285942bf3f7ab339ce85178ded544225 Mon Sep 17 00:00:00 2001 From: Haiying Wang Date: Wed, 12 Jul 2006 10:48:05 -0400 Subject: Add support for reading and writing mac addresses to or from ID EEPROM. Added code for reading and writing Mac addresses to/from ID EEPROM(0x57). With attached patch, we can use command "mac/mac read/mac save/" to read and write EEPROM under u-boot prompt. U-boot will calculate the checksum of EEPROM while bootup, if it is right, then u-boot will check whether the mac address of eTSEC0/1/2/3 is availalbe (non-zero). If there is mac address availabe in EEPROM, u-boot will use it, otherewise, u-boot will use the mac address defined in MPC8641HPCN.h. This matches the requirement to set unique mac address for each TSEC port. Signed-off-by: Haiying Wang Signed-off-by: York Sun --- lib_ppc/board.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib_ppc/board.c') diff --git a/lib_ppc/board.c b/lib_ppc/board.c index c367b3e..2c29f46 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -862,6 +862,10 @@ void board_init_r (gd_t *id, ulong dest_addr) } #endif +#ifdef CFG_ID_EEPROM + mac_read_from_eeprom(); +#endif + #if defined(CONFIG_TQM8xxL) || defined(CONFIG_TQM8260) || \ defined(CONFIG_CCM) || defined(CONFIG_KUP4K) || defined(CONFIG_KUP4X) load_sernum_ethaddr (); -- cgit v1.1