Fix compiler warnings for ARM systems.

Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
Wolfgang Denk 2007-11-18 17:11:09 +01:00
parent 409ecdc0bb
commit 8412d814ce
8 changed files with 11 additions and 8 deletions

View File

@ -290,7 +290,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
* Copy memory to flash * Copy memory to flash
*/ */
volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) static int write_hword (flash_info_t * info, ulong dest, ushort data)
{ {
vu_short *addr = (vu_short *) dest; vu_short *addr = (vu_short *) dest;
ushort result; ushort result;

View File

@ -128,7 +128,7 @@ typedef struct {
} /*__attribute__((__packed__))*/ VCMA9_PLD; } /*__attribute__((__packed__))*/ VCMA9_PLD;
#define VCMA9_PLD_BASE 0x2C000100 #define VCMA9_PLD_BASE 0x2C000100
static inline VCMA9_PLD * const VCMA9_GetBase_PLD(void) static inline VCMA9_PLD * VCMA9_GetBase_PLD(void)
{ {
return (VCMA9_PLD * const)VCMA9_PLD_BASE; return (VCMA9_PLD * const)VCMA9_PLD_BASE;
} }

View File

@ -196,7 +196,7 @@ void flash_print_info (flash_info_t * info)
int i; int i;
uchar *boottype; uchar *boottype;
uchar *bootletter; uchar *bootletter;
uchar *fmt; char *fmt;
uchar botbootletter[] = "B"; uchar botbootletter[] = "B";
uchar topbootletter[] = "T"; uchar topbootletter[] = "T";
uchar botboottype[] = "bottom boot sector"; uchar botboottype[] = "bottom boot sector";

View File

@ -288,7 +288,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
* Copy memory to flash * Copy memory to flash
*/ */
volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) static int write_hword (flash_info_t * info, ulong dest, ushort data)
{ {
vu_short *addr = (vu_short *) dest; vu_short *addr = (vu_short *) dest;
ushort result; ushort result;

View File

@ -290,7 +290,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
* Copy memory to flash * Copy memory to flash
*/ */
volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) static int write_hword (flash_info_t * info, ulong dest, ushort data)
{ {
vu_short *addr = (vu_short *) dest; vu_short *addr = (vu_short *) dest;
ushort result; ushort result;

View File

@ -44,6 +44,7 @@
#if ( WEP_FLASH_BUS_WIDTH == 1 ) #if ( WEP_FLASH_BUS_WIDTH == 1 )
# define FLASH_BUS vu_char # define FLASH_BUS vu_char
# define FLASH_BUS_RET u_char
# if ( WEP_FLASH_INTERLEAVE == 1 ) # if ( WEP_FLASH_INTERLEAVE == 1 )
# define FLASH_CMD( x ) x # define FLASH_CMD( x ) x
# else # else
@ -53,6 +54,7 @@
#elif ( WEP_FLASH_BUS_WIDTH == 2 ) #elif ( WEP_FLASH_BUS_WIDTH == 2 )
# define FLASH_BUS vu_short # define FLASH_BUS vu_short
# define FLASH_BUS_RET u_short
# if ( WEP_FLASH_INTERLEAVE == 1 ) # if ( WEP_FLASH_INTERLEAVE == 1 )
# define FLASH_CMD( x ) x # define FLASH_CMD( x ) x
# elif ( WEP_FLASH_INTERLEAVE == 2 ) # elif ( WEP_FLASH_INTERLEAVE == 2 )
@ -64,6 +66,7 @@
#elif ( WEP_FLASH_BUS_WIDTH == 4 ) #elif ( WEP_FLASH_BUS_WIDTH == 4 )
# define FLASH_BUS vu_long # define FLASH_BUS vu_long
# define FLASH_BUS_RET u_long
# if ( WEP_FLASH_INTERLEAVE == 1 ) # if ( WEP_FLASH_INTERLEAVE == 1 )
# define FLASH_CMD( x ) x # define FLASH_CMD( x ) x
# elif ( WEP_FLASH_INTERLEAVE == 2 ) # elif ( WEP_FLASH_INTERLEAVE == 2 )
@ -81,7 +84,7 @@
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
static FLASH_BUS flash_status_reg (void) static FLASH_BUS_RET flash_status_reg (void)
{ {
FLASH_BUS *addr = (FLASH_BUS *) 0; FLASH_BUS *addr = (FLASH_BUS *) 0;

View File

@ -457,7 +457,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
uchar i2c_reg_read (uchar chip, uchar reg) uchar i2c_reg_read (uchar chip, uchar reg)
{ {
char buf; uchar buf;
PRINTD(("i2c_reg_read(chip=0x%02x, reg=0x%02x)\n",chip,reg)); PRINTD(("i2c_reg_read(chip=0x%02x, reg=0x%02x)\n",chip,reg));
i2c_read(chip, reg, 1, &buf, 1); i2c_read(chip, reg, 1, &buf, 1);

View File

@ -175,7 +175,7 @@ s32 eth_send(volatile void *packet, s32 length)
} }
/* copy user data into frame data pointer */ /* copy user data into frame data pointer */
memcpy((void *)(eth->m_curTX_FD->m_frameDataPtr.bf.dataPtr), memcpy((void *)((u32)(eth->m_curTX_FD->m_frameDataPtr.bf.dataPtr)),
(void *)packet, (void *)packet,
length); length);