diff options
author | Wolfgang Denk <wd@denx.de> | 2009-03-21 22:15:49 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-21 22:15:49 +0100 |
commit | ee1702d75a30d076139d1841383a1fa7220a0e11 (patch) | |
tree | b008c231b7d5e4e52ac49aec9a49bc73413aaf30 /board/cmc_pu2 | |
parent | e60beb13cf0135dc71c541021487b5ccc4d269cb (diff) | |
parent | faac4fd852e39cb1d7a740801b060e41aeacef1f (diff) | |
download | u-boot-imx-ee1702d75a30d076139d1841383a1fa7220a0e11.zip u-boot-imx-ee1702d75a30d076139d1841383a1fa7220a0e11.tar.gz u-boot-imx-ee1702d75a30d076139d1841383a1fa7220a0e11.tar.bz2 |
Merge branch 'next' of ../next
Diffstat (limited to 'board/cmc_pu2')
-rw-r--r-- | board/cmc_pu2/load_sernum_ethaddr.c | 18 | ||||
-rw-r--r-- | board/cmc_pu2/u-boot.lds | 2 |
2 files changed, 4 insertions, 16 deletions
diff --git a/board/cmc_pu2/load_sernum_ethaddr.c b/board/cmc_pu2/load_sernum_ethaddr.c index 354566c..5ef9f20 100644 --- a/board/cmc_pu2/load_sernum_ethaddr.c +++ b/board/cmc_pu2/load_sernum_ethaddr.c @@ -66,14 +66,13 @@ int i2c_read (unsigned char chip, unsigned int addr, int alen, * Internal structure: see struct definition */ -void load_sernum_ethaddr (void) +void misc_init_r(void) { struct manufacturer_data data; - char ethaddr[18]; char serial [9]; unsigned short chksum; unsigned char *p; - unsigned short i, is, id; + unsigned short i; #if !defined(CONFIG_HARD_I2C) && !defined(CONFIG_SOFT_I2C) #error you must define some I2C support (CONFIG_HARD_I2C or CONFIG_SOFT_I2C) @@ -97,17 +96,6 @@ void load_sernum_ethaddr (void) return; } - /* copy MAC address */ - is = 0; - id = 0; - for (i = 0; i < 6; i++) { - sprintf (ðaddr[id], "%02x", data.macadr[is++]); - id += 2; - if (is < 6) - ethaddr[id++] = ':'; - } - ethaddr[id] = '\0'; /* just to be sure */ - /* copy serial number */ sprintf (serial, "%d", data.serial_number); @@ -117,6 +105,6 @@ void load_sernum_ethaddr (void) } if (getenv("ethaddr") == NULL) { - setenv ("ethaddr", ethaddr); + eth_setenv_enetaddr("ethaddr", data.macadr); } } diff --git a/board/cmc_pu2/u-boot.lds b/board/cmc_pu2/u-boot.lds index 987b07d..33363c2 100644 --- a/board/cmc_pu2/u-boot.lds +++ b/board/cmc_pu2/u-boot.lds @@ -37,7 +37,7 @@ SECTIONS } . = ALIGN(4); - .rodata : { *(.rodata) } + .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } . = ALIGN(4); .data : { *(.data) } |