[U-Boot] [PATCH 1/2] Davinci: Make MAC address offset in EEPROM configurable, CONFIG_MAC_EEPROM_ADDR
Kim Bøndergaard
kibo at prevas.dk
Tue Jan 29 08:28:19 CET 2013
---
arch/arm/cpu/arm926ejs/davinci/misc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/arm926ejs/davinci/misc.c b/arch/arm/cpu/arm926ejs/davinci/misc.c
index c310c69..d0389a4 100644
--- a/arch/arm/cpu/arm926ejs/davinci/misc.c
+++ b/arch/arm/cpu/arm926ejs/davinci/misc.c
@@ -55,11 +55,14 @@ void dram_init_banksize(void)
* Read ethernet MAC address from EEPROM for DVEVM compatible boards.
* Returns 1 if found, 0 otherwise.
*/
+#ifndef CONFIG_MAC_EEPROM_ADDR
+#define CONFIG_MAC_EEPROM_ADDR 0x7F00
+#endif
int dvevm_read_mac_address(uint8_t *buf)
{
#ifdef CONFIG_SYS_I2C_EEPROM_ADDR
/* Read MAC address. */
- if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0x7F00,
+ if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, CONFIG_MAC_EEPROM_ADDR,
CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &buf[0], 6))
goto i2cerr;
--
1.8.0.3
More information about the U-Boot
mailing list