Patchwork [U-Boot,1/2] Davinci: Make MAC address offset in EEPROM configurable, CONFIG_MAC_EEPROM_ADDR

login
register
mail settings
Submitter Kim B√łndergaard
Date Jan. 22, 2013, 1:19 p.m.
Message ID <b652ad9199975d1e37c8b9817bd4c0702a5fada7.1358860629.git.kibo@prevas.dk>
Download mbox | patch
Permalink /patch/214553/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Kim B√łndergaard - Jan. 22, 2013, 1:19 p.m.
---
 arch/arm/cpu/arm926ejs/davinci/misc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

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;