summaryrefslogtreecommitdiff
path: root/board/evb64260
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-10-13 16:45:02 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-10-13 16:45:02 +0200
commit77ddac9480d63a80b6bb76d7ee4dcc2d1070867e (patch)
treee9563b2f28ea59062b90bb5712f141e8e9798aee /board/evb64260
parent17a8b276ba2b3499b75cd60b0b5289dbbea7967b (diff)
Cleanup for GCC-4.x
Diffstat (limited to 'board/evb64260')
-rw-r--r--board/evb64260/eth.c9
-rw-r--r--board/evb64260/eth.h4
-rw-r--r--board/evb64260/eth_addrtbl.c3
-rw-r--r--board/evb64260/flash.c8
-rw-r--r--board/evb64260/i2c.c2
-rw-r--r--board/evb64260/zuma_pbb_mbox.c2
6 files changed, 15 insertions, 13 deletions
diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index f0743fa292e..a248cadf73c 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -182,7 +182,7 @@ gt6426x_eth_receive(struct eth_dev_s *p,unsigned int icr)
*/
/* let the upper layer handle the packet */
- NetReceive (eth_data, eth_len);
+ NetReceive ((uchar *)eth_data, eth_len);
rx->buff_size_byte_count = GT6426x_ETH_BUF_SIZE<<16;
@@ -266,7 +266,7 @@ gt6426x_eth_transmit(void *v, volatile char *p, unsigned int s)
#endif
memcpy(dev->eth_tx_buffer, (char *) p, s);
- tx->buff_pointer = dev->eth_tx_buffer;
+ tx->buff_pointer = (uchar *)dev->eth_tx_buffer;
tx->bytecount_reserved = ((__u16)s) << 16;
/* 31 - own
@@ -583,7 +583,7 @@ gt6426x_eth_probe(void *v, bd_t *bis)
/* Initialize Rx Side */
for (temp = 0; temp < NR; temp++) {
- p->eth_rx_desc[temp].buff_pointer = p->eth_rx_buffer[temp];
+ p->eth_rx_desc[temp].buff_pointer = (uchar *)p->eth_rx_buffer[temp];
p->eth_rx_desc[temp].buff_size_byte_count = GT6426x_ETH_BUF_SIZE<<16;
/* GT96100 Owner */
@@ -719,7 +719,8 @@ gt6426x_eth_initialize(bd_t *bis)
dev->send = (void*)gt6426x_eth_transmit;
dev->recv = (void*)gt6426x_eth_poll;
- dev->priv = (void*)p = calloc( sizeof(*p), 1 );
+ p = calloc( sizeof(*p), 1 );
+ dev->priv = (void*)p;
if (!p)
{
printf( "%s: %s allocation failure, %s\n",
diff --git a/board/evb64260/eth.h b/board/evb64260/eth.h
index ecc376213a5..beb6db16dfb 100644
--- a/board/evb64260/eth.h
+++ b/board/evb64260/eth.h
@@ -39,14 +39,14 @@ typedef struct eth0_tx_desc_struct {
volatile struct eth0_tx_desc_struct * next_desc;
/* Note - the following will not work for 64 bit addressing */
volatile unsigned char * buff_pointer;
-} eth0_tx_desc_single __attribute__ ((packed));
+} __attribute__ ((packed)) eth0_tx_desc_single;
typedef struct eth0_rx_desc_struct {
volatile __u32 buff_size_byte_count;
volatile __u32 command_status;
volatile struct eth0_rx_desc_struct * next_desc;
volatile unsigned char * buff_pointer;
-} eth0_rx_desc_single __attribute__ ((packed));
+} __attribute__ ((packed)) eth0_rx_desc_single;
#define NT 20 /* Number of Transmit buffers */
#define NR 20 /* Number of Receive buffers */
diff --git a/board/evb64260/eth_addrtbl.c b/board/evb64260/eth_addrtbl.c
index 0abc7d45369..69882f53022 100644
--- a/board/evb64260/eth_addrtbl.c
+++ b/board/evb64260/eth_addrtbl.c
@@ -55,8 +55,9 @@ unsigned int initAddressTable (u32 port, u32 hashMode, u32 hashSizeSelector)
int bytes =
hashLength[hashSizeSelector] * sizeof (addrTblEntry);
- tableBase = (unsigned int) realAddrTableBase[port] =
+ realAddrTableBase[port] =
malloc (bytes + 64);
+ tableBase = (unsigned int)realAddrTableBase;
if (!tableBase) {
printf ("%s: alloc memory failed \n", __FUNCTION__);
diff --git a/board/evb64260/flash.c b/board/evb64260/flash.c
index 7ca6f0ae73d..6ab23dce2f7 100644
--- a/board/evb64260/flash.c
+++ b/board/evb64260/flash.c
@@ -589,7 +589,7 @@ flash_get_size (int portwidth, vu_long *addr, flash_info_t *info)
int
flash_erase (flash_info_t *info, int s_first, int s_last)
{
- volatile unsigned char *addr = (char *)(info->start[0]);
+ volatile unsigned char *addr = (uchar *)(info->start[0]);
int flag, prot, sect, l_sect;
ulong start, now, last;
@@ -600,7 +600,7 @@ flash_erase (flash_info_t *info, int s_first, int s_last)
if((info->flash_id & FLASH_TYPEMASK) == FLASH_RAM) {
for (sect = s_first; sect<=s_last; sect++) {
int sector_size=info->size/info->sector_count;
- addr = (char *)(info->start[sect]);
+ addr = (uchar *)(info->start[sect]);
memset((void *)addr, 0, sector_size);
}
return 0;
@@ -658,7 +658,7 @@ flash_erase (flash_info_t *info, int s_first, int s_last)
/* Start erase on unprotected sectors */
for (sect = s_first; sect<=s_last; sect++) {
if (info->protect[sect] == 0) { /* not protected */
- addr = (char *)(info->start[sect]);
+ addr = (uchar *)(info->start[sect]);
flash_cmd(info->portwidth,addr,0,0x30);
l_sect = sect;
}
@@ -794,7 +794,7 @@ write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
static int
write_word (flash_info_t *info, ulong dest, ulong data)
{
- volatile unsigned char *addr = (char *)(info->start[0]);
+ volatile unsigned char *addr = (uchar *)(info->start[0]);
ulong start;
int flag, i;
diff --git a/board/evb64260/i2c.c b/board/evb64260/i2c.c
index 22cb8096c83..c62b64729c1 100644
--- a/board/evb64260/i2c.c
+++ b/board/evb64260/i2c.c
@@ -146,7 +146,7 @@ i2c_select_device(uchar dev_addr, uchar read, int ten_bit)
static uchar
i2c_get_data(uchar* return_data, int len) {
- unsigned int data, status;
+ unsigned int data, status = 0;
int count = 0;
DP(puts("i2c_get_data\n"));
diff --git a/board/evb64260/zuma_pbb_mbox.c b/board/evb64260/zuma_pbb_mbox.c
index 5131339a6c9..2b9a469f8d1 100644
--- a/board/evb64260/zuma_pbb_mbox.c
+++ b/board/evb64260/zuma_pbb_mbox.c
@@ -116,7 +116,7 @@ zuma_mbox_dump(void)
static void
zuma_mbox_setenv(void)
{
- unsigned char *data, buf[32];
+ char *data, buf[32];
unsigned char save = 0;
data = getenv("baudrate");