[U-Boot] [PATCH 1/1] Davinci: Make MAC address offset in EEPROM configurable CONFIG_SYS_I2C_EEPROM_MAC_OFFSET
Kim Bøndergaard
kibo at prevas.dk
Fri Feb 1 08:18:58 CET 2013
---
arch/arm/cpu/arm926ejs/davinci/misc.c | 2 +-
include/configs/da830evm.h | 1 +
include/configs/davinci_dm365evm.h | 1 +
include/configs/davinci_dm6467evm.h | 1 +
include/configs/davinci_dvevm.h | 1 +
include/configs/davinci_sffsdr.h | 1 +
include/configs/davinci_sonata.h | 1 +
7 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/arm926ejs/davinci/misc.c b/arch/arm/cpu/arm926ejs/davinci/misc.c
index 7e5728c..3e82d9a 100644
--- a/arch/arm/cpu/arm926ejs/davinci/misc.c
+++ b/arch/arm/cpu/arm926ejs/davinci/misc.c
@@ -59,7 +59,7 @@ 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_SYS_I2C_EEPROM_MAC_OFFSET,
CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &buf[0], 6))
goto i2cerr;
diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h
index f7ac256..2fa4a79 100644
--- a/include/configs/da830evm.h
+++ b/include/configs/da830evm.h
@@ -80,6 +80,7 @@
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
+#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x7F00
/*
* Network & Ethernet Configuration
diff --git a/include/configs/davinci_dm365evm.h b/include/configs/davinci_dm365evm.h
index 6a331aa..72ec862 100644
--- a/include/configs/davinci_dm365evm.h
+++ b/include/configs/davinci_dm365evm.h
@@ -53,6 +53,7 @@
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
+#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x7F00
/* Network Configuration */
#define CONFIG_DRIVER_TI_EMAC
diff --git a/include/configs/davinci_dm6467evm.h b/include/configs/davinci_dm6467evm.h
index 366c77f..93da788 100644
--- a/include/configs/davinci_dm6467evm.h
+++ b/include/configs/davinci_dm6467evm.h
@@ -48,6 +48,7 @@ extern unsigned int davinci_arm_clk_get(void);
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
+#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x7F00
/* Memory Info */
#define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
diff --git a/include/configs/davinci_dvevm.h b/include/configs/davinci_dvevm.h
index ab9cedd..c7917b4 100644
--- a/include/configs/davinci_dvevm.h
+++ b/include/configs/davinci_dvevm.h
@@ -67,6 +67,7 @@
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
+#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x7F00
/*=============*/
/* Memory Info */
/*=============*/
diff --git a/include/configs/davinci_sffsdr.h b/include/configs/davinci_sffsdr.h
index 958b19a..d150f9e 100644
--- a/include/configs/davinci_sffsdr.h
+++ b/include/configs/davinci_sffsdr.h
@@ -39,6 +39,7 @@
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
+#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x7F00
/* Memory Info */
#define CONFIG_SYS_MALLOC_LEN (0x10000 + 256*1024) /* malloc() len */
#define CONFIG_SYS_MEMTEST_START 0x80000000 /* memtest start address */
diff --git a/include/configs/davinci_sonata.h b/include/configs/davinci_sonata.h
index 3d8d392..fdec085 100644
--- a/include/configs/davinci_sonata.h
+++ b/include/configs/davinci_sonata.h
@@ -69,6 +69,7 @@
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
+#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x7F00
/*=============*/
/* Memory Info */
/*=============*/
--
1.8.0.3
More information about the U-Boot
mailing list