diff options
| author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 | 
|---|---|---|
| committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 | 
| commit | cb5473205206c7f14cbb1e747f28ec75b48826e2 (patch) | |
| tree | 8f4808d60917100b18a10b05230f7638a0a9bbcc /examples/82559_eeprom.c | |
| parent | baf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff) | |
| parent | 92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff) | |
| download | olio-uboot-2014.01-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.xz olio-uboot-2014.01-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip | |
Merge branch 'fixes' into cleanups
Conflicts:
	board/atmel/atngw100/atngw100.c
	board/atmel/atstk1000/atstk1000.c
	cpu/at32ap/at32ap700x/gpio.c
	include/asm-avr32/arch-at32ap700x/clk.h
	include/configs/atngw100.h
	include/configs/atstk1002.h
	include/configs/atstk1003.h
	include/configs/atstk1004.h
	include/configs/atstk1006.h
	include/configs/favr-32-ezkit.h
	include/configs/hammerhead.h
	include/configs/mimc200.h
Diffstat (limited to 'examples/82559_eeprom.c')
| -rw-r--r-- | examples/82559_eeprom.c | 17 | 
1 files changed, 10 insertions, 7 deletions
| diff --git a/examples/82559_eeprom.c b/examples/82559_eeprom.c index 1a121d428..5e2eee9e9 100644 --- a/examples/82559_eeprom.c +++ b/examples/82559_eeprom.c @@ -19,7 +19,6 @@   */  #define _PPC_STRING_H_		/* avoid unnecessary str/mem functions */ -#define _LINUX_STRING_H_	/* avoid unnecessary str/mem functions */  #include <common.h>  #include <exports.h> @@ -51,13 +50,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 +159,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 +308,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); |