Skip to contentSkip to conversation

Davinci: Make MAC address offset in EEPROM configurable

PATCH New Kim Bøndergaard 2 participants 4 messages Feb 1, 2013 – Feb 18, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover Davinci: Make MAC address offset in EEPROM configurable

Like subjects say, offset of MAC adress in EEPROM changed from hardcoded value to a per board configurable value

The following changes since commit 79af5f82d78b8bbc5fe81302b8a4b7fb5d880f25:

Davinci: Fix, console output confusing while setting MAC address (2013-02-01 07:04:12 +0000)

are available in the git repository at:

git://gitorious.org/~kibo/u-boot-shr/kibos-u-boot kibo-master
http://gitorious.org/~kibo/u-boot-shr/kibos-u-boot/commits/kibo-master

Kim B?ndergaard (1):
Davinci: Make MAC address offset in EEPROM configurable
CONFIG_SYS_I2C_EEPROM_MAC_OFFSET

 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(-)
Signature · 1 line
1.8.0.3
#1 lore raw

PATCH 1/1 Davinci: Make MAC address offset in EEPROM configurable CONFIG_SYS_I2C_EEPROM_MAC_OFFSET

---
 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(-)
arch/arm/cpu/arm926ejs/davinci/misc.c +1 -1
index 7e5728c..3e82d9a 100644
@@ -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;
 
include/configs/da830evm.h +1 -0
index f7ac256..2fa4a79 100644
@@ -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
include/configs/davinci_dm365evm.h +1 -0
index 6a331aa..72ec862 100644
@@ -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
include/configs/davinci_dm6467evm.h +1 -0
index 366c77f..93da788 100644
@@ -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 */
include/configs/davinci_dvevm.h +1 -0
index ab9cedd..c7917b4 100644
@@ -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 */
 /*=============*/
include/configs/davinci_sffsdr.h +1 -0
index 958b19a..d150f9e 100644
@@ -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 */
include/configs/davinci_sonata.h +1 -0
index 3d8d392..fdec085 100644
@@ -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 */
 /*=============*/
Signature · 1 line
1.8.0.3
#2 lore raw

PATCH 1/1 Davinci: Make MAC address offset in EEPROM configurable CONFIG_SYS_I2C_EEPROM_MAC_OFFSET

Quoted 9 lines · Kim B??ndergaard
---
 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(-)

With the following addition to fix da850_am18xxevm:

boards.cfg +1 -1
index b1319aa..e89762b 100644
@@ -137,7 +137,7 @@ portuxg20                    arm         arm926ejs   stamp9g20           taskit
 stamp9g20                    arm         arm926ejs   stamp9g20           taskit         at91        stamp9g20:AT91SAM9G20
 cam_enc_4xx                  arm         arm926ejs   cam_enc_4xx         ait            davinci     cam_enc_4xx
 da830evm                     arm         arm926ejs   da8xxevm            davinci        davinci
-da850_am18xxevm              arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:DA850_AM18X_EVM,MAC_ADDR_IN_EEPROM,SYS_I2C_EEPROM_ADDR_LEN=2,SYS_I2C_EEPROM_ADDR=0x50
+da850_am18xxevm              arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:DA850_AM18X_EVM,MAC_ADDR_IN_EEPROM,SYS_I2C_EEPROM_ADDR_LEN=2,SYS_I2C_EEPROM_ADDR=0x50,SYS_I2C_EEPROM_MAC_OFFSET=0x7F00
 da850evm                     arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:MAC_ADDR_IN_SPIFLASH
 da850evm_direct_nor          arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:MAC_ADDR_IN_SPIFLASH,USE_NOR,DIRECT_NOR_BOOT
 davinci_dm355evm             arm         arm926ejs   dm355evm            davinci        davinci

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130218/ea10aaad/attachment.pgp>
#3 lore raw

PATCH 1/1 Davinci: Make MAC address offset in EEPROM configurable CONFIG_SYS_I2C_EEPROM_MAC_OFFSET

Quoted 28 lines · Tom Rini
Quoted 9 lines · Kim B??ndergaard
---
 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(-)

With the following addition to fix da850_am18xxevm:

boards.cfg +1 -1
index b1319aa..e89762b 100644
@@ -137,7 +137,7 @@ portuxg20                    arm         arm926ejs   stamp9g20           taskit
 stamp9g20                    arm         arm926ejs   stamp9g20           taskit         at91        stamp9g20:AT91SAM9G20
 cam_enc_4xx                  arm         arm926ejs   cam_enc_4xx         ait            davinci     cam_enc_4xx
 da830evm                     arm         arm926ejs   da8xxevm            davinci        davinci
-da850_am18xxevm              arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:DA850_AM18X_EVM,MAC_ADDR_IN_EEPROM,SYS_I2C_EEPROM_ADDR_LEN=2,SYS_I2C_EEPROM_ADDR=0x50
+da850_am18xxevm              arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:DA850_AM18X_EVM,MAC_ADDR_IN_EEPROM,SYS_I2C_EEPROM_ADDR_LEN=2,SYS_I2C_EEPROM_ADDR=0x50,SYS_I2C_EEPROM_MAC_OFFSET=0x7F00
 da850evm                     arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:MAC_ADDR_IN_SPIFLASH
 da850evm_direct_nor          arm         arm926ejs   da8xxevm            davinci        davinci     da850evm:MAC_ADDR_IN_SPIFLASH,USE_NOR,DIRECT_NOR_BOOT
 davinci_dm355evm             arm         arm926ejs   dm355evm            davinci        davinci
Quoted 1 line

Applied to u-boot-ti/master, thanks!

Blarg, I take it back. It's not applied as I see you didn't include a Signed-off-by line. Please incorporate the above change which is:

and submit a v3, assuming the rules for a Signed-off-by-line are true.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130218/253b6bf4/attachment.pgp>