summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2009-03-22 14:28:13 +0100
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2009-03-22 14:28:13 +0100
commit176c4a982c6531f96426afaa1126cf9a5e2d5e03 (patch)
treec185554cb3fcc1af7922999a50d604d9226b9d88
parent53158aea995221706b42c7bad9f717b31ae20414 (diff)
downloadu-boot-imx-176c4a982c6531f96426afaa1126cf9a5e2d5e03.zip
u-boot-imx-176c4a982c6531f96426afaa1126cf9a5e2d5e03.tar.gz
u-boot-imx-176c4a982c6531f96426afaa1126cf9a5e2d5e03.tar.bz2
cmc_pu2: fix misc_init_r prototype
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-rw-r--r--board/cmc_pu2/load_sernum_ethaddr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/board/cmc_pu2/load_sernum_ethaddr.c b/board/cmc_pu2/load_sernum_ethaddr.c
index 5ef9f20..f02406c 100644
--- a/board/cmc_pu2/load_sernum_ethaddr.c
+++ b/board/cmc_pu2/load_sernum_ethaddr.c
@@ -66,7 +66,7 @@ int i2c_read (unsigned char chip, unsigned int addr, int alen,
* Internal structure: see struct definition
*/
-void misc_init_r(void)
+int misc_init_r(void)
{
struct manufacturer_data data;
char serial [9];
@@ -80,7 +80,7 @@ void misc_init_r(void)
if (i2c_read(I2C_CHIP, I2C_OFFSET, I2C_ALEN, (unsigned char *)&data,
sizeof(data)) != 0) {
puts ("Error reading manufacturer data from EEPROM\n");
- return;
+ return -1;
}
/* check if manufacturer data block is valid */
@@ -93,7 +93,7 @@ void misc_init_r(void)
if (chksum != data.chksum) {
puts ("Error: manufacturer data block has invalid checksum\n");
- return;
+ return -1;
}
/* copy serial number */
@@ -107,4 +107,6 @@ void misc_init_r(void)
if (getenv("ethaddr") == NULL) {
eth_setenv_enetaddr("ethaddr", data.macadr);
}
+
+ return 0;
}