summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2008-09-07 07:08:42 +1000
committerWolfgang Denk <wd@denx.de>2008-09-09 11:48:53 +0200
commit3ef96ded38a8d33b58b9fab9cd879d51ddac4cbd (patch)
treeb40a0685df1836f251fab53f4a767bb7287e0d03 /examples
parent5608692104efa8d56df803dc79ea41ac3607eee5 (diff)
downloadu-boot-imx-3ef96ded38a8d33b58b9fab9cd879d51ddac4cbd.zip
u-boot-imx-3ef96ded38a8d33b58b9fab9cd879d51ddac4cbd.tar.gz
u-boot-imx-3ef96ded38a8d33b58b9fab9cd879d51ddac4cbd.tar.bz2
Update i386 code (sc520_cdp)
Attempt to bring i386 / sc520 inline with master Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/82559_eeprom.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/examples/82559_eeprom.c b/examples/82559_eeprom.c
index 1a121d4..d99af26 100644
--- a/examples/82559_eeprom.c
+++ b/examples/82559_eeprom.c
@@ -51,13 +51,17 @@ static inline unsigned short swap16(unsigned short x)
}
-static inline void *memcpy(void *dst, const void *src, unsigned int len)
+void * memcpy(void * dest,const void *src,size_t count)
{
- void * ret = dst;
- while (len-- > 0) *((char *)dst)++ = *((char *)src)++;
- return ret;
+ char *tmp = (char *) dest, *s = (char *) src;
+
+ while (count--)
+ *tmp++ = *s++;
+
+ return dest;
}
+
/* The EEPROM commands include the alway-set leading bit. */
#define EE_WRITE_CMD (5)
#define EE_READ_CMD (6)
@@ -156,7 +160,7 @@ static int reset_eeprom(unsigned long ioaddr, unsigned char *hwaddr)
int size_test;
int i;
- printf("Resetting i82559 EEPROM @ 0x%08x ... ", ioaddr);
+ printf("Resetting i82559 EEPROM @ 0x%08lx ... ", ioaddr);
size_test = do_eeprom_cmd(ioaddr, (EE_READ_CMD << 8) << 16, 27);
eeprom_addr_size = (size_test & 0xffe0000) == 0xffe0000 ? 8 : 6;
@@ -305,7 +309,7 @@ write_config_word(int bus, int dev, int func, int reg, u16 data)
int main (int argc, char *argv[])
{
unsigned char *eth_addr;
- char buf[6];
+ uchar buf[6];
int instance;
app_startup(argv);