diff options
Diffstat (limited to 'board')
130 files changed, 337 insertions, 334 deletions
diff --git a/board/LEOX/elpt860/elpt860.c b/board/LEOX/elpt860/elpt860.c index 82a831f..775db73 100644 --- a/board/LEOX/elpt860/elpt860.c +++ b/board/LEOX/elpt860/elpt860.c @@ -169,7 +169,7 @@ int board_early_init_f (void) int checkboard (void) { - unsigned char *s = getenv ("serial#"); + char *s = getenv ("serial#"); if (!s || strncmp (s, "ELPT860", 7)) printf ("### No HW ID - assuming ELPT860\n"); @@ -253,7 +253,7 @@ long int initdram (int board_type) * try 8 column mode */ size8 = dram_size (CFG_MAMR_8COL, - (ulong *) SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); + SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -261,7 +261,7 @@ long int initdram (int board_type) * try 9 column mode */ size9 = dram_size (CFG_MAMR_9COL, - (ulong *) SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); + SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ size_b0 = size9; diff --git a/board/Marvell/common/flash.c b/board/Marvell/common/flash.c index c2c5b76..a8add85 100644 --- a/board/Marvell/common/flash.c +++ b/board/Marvell/common/flash.c @@ -526,7 +526,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; @@ -696,7 +696,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) 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; @@ -752,7 +752,7 @@ int 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; } @@ -893,7 +893,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) /* broken for 2x16: TODO */ 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; ulong mask; @@ -926,7 +926,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) CHIP_CMD_RST); /* 1st cycle of word/byte program */ /* write 0x40 to the location to program */ - flash_cmd (info->portwidth, (char *) dest, 0, + flash_cmd (info->portwidth, (uchar *) dest, 0, CHIP_CMD_PROG); /* 2nd cycle of word/byte program */ /* write the data to the destination address */ diff --git a/board/Marvell/common/i2c.c b/board/Marvell/common/i2c.c index 624ee5c..32b2b30 100644 --- a/board/Marvell/common/i2c.c +++ b/board/Marvell/common/i2c.c @@ -168,7 +168,7 @@ static uchar 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/Marvell/db64360/db64360.c b/board/Marvell/db64360/db64360.c index 8e181d4..a2ab2d7 100644 --- a/board/Marvell/db64360/db64360.c +++ b/board/Marvell/db64360/db64360.c @@ -610,7 +610,7 @@ unsigned long long pattern[] = { int mem_test_data (void) { unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START; - unsigned long long temp64; + unsigned long long temp64 = 0; int num_patterns = sizeof (pattern) / sizeof (pattern[0]); int i; unsigned int hi, lo; @@ -717,7 +717,7 @@ int mem_march (volatile unsigned long long *base, unsigned long long wmask, short read, short write) { unsigned int i; - unsigned long long temp; + unsigned long long temp = 0; unsigned int hitemp, lotemp, himask, lomask; for (i = 0; i < size; i++) { diff --git a/board/Marvell/db64360/mv_eth.c b/board/Marvell/db64360/mv_eth.c index e2719b9..2dd47bf 100644 --- a/board/Marvell/db64360/mv_eth.c +++ b/board/Marvell/db64360/mv_eth.c @@ -267,8 +267,9 @@ void mv6436x_eth_initialize (bd_t * bis) dev->send = (void *) db64360_eth_transmit; dev->recv = (void *) db64360_eth_poll; - dev->priv = (void *) ethernet_private = - calloc (sizeof (*ethernet_private), 1); + ethernet_private = calloc (sizeof (*ethernet_private), 1); + dev->priv = (void *) ethernet_private; + if (!ethernet_private) { printf ("%s: %s allocation failure, %s\n", __FUNCTION__, dev->name, @@ -281,8 +282,8 @@ void mv6436x_eth_initialize (bd_t * bis) memcpy (ethernet_private->port_mac_addr, dev->enetaddr, 6); /* set pointer to memory for stats data structure etc... */ - ethernet_private->port_private = (void *) port_private = - calloc (sizeof (*ethernet_private), 1); + port_private = calloc (sizeof (*ethernet_private), 1); + ethernet_private->port_private = (void *)port_private; if (!port_private) { printf ("%s: %s allocation failure, %s\n", __FUNCTION__, dev->name, diff --git a/board/Marvell/db64460/db64460.c b/board/Marvell/db64460/db64460.c index 75eb5e8..a4abf8d 100644 --- a/board/Marvell/db64460/db64460.c +++ b/board/Marvell/db64460/db64460.c @@ -610,7 +610,7 @@ unsigned long long pattern[] = { int mem_test_data (void) { unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START; - unsigned long long temp64; + unsigned long long temp64 = 0; int num_patterns = sizeof (pattern) / sizeof (pattern[0]); int i; unsigned int hi, lo; @@ -717,7 +717,7 @@ int mem_march (volatile unsigned long long *base, unsigned long long wmask, short read, short write) { unsigned int i; - unsigned long long temp; + unsigned long long temp = 0; unsigned int hitemp, lotemp, himask, lomask; for (i = 0; i < size; i++) { diff --git a/board/Marvell/db64460/mv_eth.c b/board/Marvell/db64460/mv_eth.c index b78fda3..a50f174 100644 --- a/board/Marvell/db64460/mv_eth.c +++ b/board/Marvell/db64460/mv_eth.c @@ -267,8 +267,8 @@ void mv6446x_eth_initialize (bd_t * bis) dev->send = (void *) db64460_eth_transmit; dev->recv = (void *) db64460_eth_poll; - dev->priv = (void *) ethernet_private = - calloc (sizeof (*ethernet_private), 1); + ethernet_private = calloc (sizeof (*ethernet_private), 1); + dev->priv = (void *)ethernet_private; if (!ethernet_private) { printf ("%s: %s allocation failure, %s\n", __FUNCTION__, dev->name, @@ -281,8 +281,8 @@ void mv6446x_eth_initialize (bd_t * bis) memcpy (ethernet_private->port_mac_addr, dev->enetaddr, 6); /* set pointer to memory for stats data structure etc... */ - ethernet_private->port_private = (void *) port_private = - calloc (sizeof (*ethernet_private), 1); + port_private = calloc (sizeof (*ethernet_private), 1); + ethernet_private->port_private = (void *)port_private; if (!port_private) { printf ("%s: %s allocation failure, %s\n", __FUNCTION__, dev->name, diff --git a/board/RPXClassic/RPXClassic.c b/board/RPXClassic/RPXClassic.c index 5b12a0c..49cb8ad 100644 --- a/board/RPXClassic/RPXClassic.c +++ b/board/RPXClassic/RPXClassic.c @@ -114,8 +114,8 @@ void board_get_enetaddr (uchar * enet) i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE); /* Read 256 bytes in EEPROM */ - i2c_read (0x54, 0, 1, buff, 128); - i2c_read (0x54, 128, 1, buff + 128, 128); + i2c_read (0x54, 0, 1, (uchar *)buff, 128); + i2c_read (0x54, 128, 1, (uchar *)buff + 128, 128); /* Retrieve MAC address in buffer (key EA) */ for (cp = buff;;) { @@ -123,7 +123,7 @@ void board_get_enetaddr (uchar * enet) cp += 3; /* Read MAC address */ for (i = 0; i < 6; i++, cp += 2) { - enet[i] = aschex_to_byte (cp); + enet[i] = aschex_to_byte ((unsigned char *)cp); } } /* Scan to the end of the record */ @@ -200,7 +200,7 @@ long int initdram (int board_type) * try 10 column mode */ - size10 = dram_size (CFG_MAMR_10COL, (ulong *) SDRAM_BASE_PRELIM, + size10 = dram_size (CFG_MAMR_10COL, SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); return (size10); diff --git a/board/RPXlite/RPXlite.c b/board/RPXlite/RPXlite.c index d2c2116..f37e07b 100644 --- a/board/RPXlite/RPXlite.c +++ b/board/RPXlite/RPXlite.c @@ -137,7 +137,7 @@ long int initdram (int board_type) * try 10 column mode */ - size10 = dram_size (CFG_MAMR_10COL, (ulong *) SDRAM_BASE_PRELIM, + size10 = dram_size (CFG_MAMR_10COL, SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); return (size10); diff --git a/board/RPXlite_dw/RPXlite_dw.c b/board/RPXlite_dw/RPXlite_dw.c index 86cf6c1..237c58a 100644 --- a/board/RPXlite_dw/RPXlite_dw.c +++ b/board/RPXlite_dw/RPXlite_dw.c @@ -142,7 +142,7 @@ long int initdram (int board_type) * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *)SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); + size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); /* * Final mapping: diff --git a/board/RRvision/RRvision.c b/board/RRvision/RRvision.c index d12ea82..f46bb9e 100644 --- a/board/RRvision/RRvision.c +++ b/board/RRvision/RRvision.c @@ -93,7 +93,7 @@ const uint sdram_table[] = int checkboard (void) { - unsigned char *s = getenv ("serial#"); + char *s = getenv ("serial#"); puts ("Board: RRvision "); @@ -157,7 +157,7 @@ long int initdram (int board_type) * try 8 column mode */ size8 = dram_size (CFG_MAMR_8COL, - (ulong *)SDRAM_BASE2_PRELIM, + SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -166,7 +166,7 @@ long int initdram (int board_type) * try 9 column mode */ size9 = dram_size (CFG_MAMR_9COL, - (ulong *) SDRAM_BASE2_PRELIM, + SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ diff --git a/board/amcc/bubinga/bubinga.c b/board/amcc/bubinga/bubinga.c index b4e9349..fe6ce8a 100644 --- a/board/amcc/bubinga/bubinga.c +++ b/board/amcc/bubinga/bubinga.c @@ -42,7 +42,7 @@ int board_early_init_f(void) */ int checkboard(void) { - unsigned char *s = getenv("serial#"); + char *s = getenv("serial#"); puts("Board: Bubinga - AMCC PPC405EP Evaluation Board"); diff --git a/board/amcc/ebony/ebony.c b/board/amcc/ebony/ebony.c index f6bb837..9191f0f 100644 --- a/board/amcc/ebony/ebony.c +++ b/board/amcc/ebony/ebony.c @@ -91,7 +91,7 @@ int board_early_init_f(void) int checkboard(void) { sys_info_t sysinfo; - unsigned char *s = getenv("serial#"); + char *s = getenv("serial#"); get_sys_info(&sysinfo); diff --git a/board/amcc/ocotea/ocotea.c b/board/amcc/ocotea/ocotea.c index 50981c2..5b28c3b 100644 --- a/board/amcc/ocotea/ocotea.c +++ b/board/amcc/ocotea/ocotea.c @@ -187,7 +187,7 @@ int board_early_init_f (void) int checkboard (void) { sys_info_t sysinfo; - unsigned char *s = getenv ("serial#"); + char *s = getenv ("serial#"); get_sys_info (&sysinfo); diff --git a/board/amcc/walnut/walnut.c b/board/amcc/walnut/walnut.c index 9fca0a6..f1a96a6 100644 --- a/board/amcc/walnut/walnut.c +++ b/board/amcc/walnut/walnut.c @@ -67,7 +67,7 @@ int board_early_init_f(void) */ int checkboard(void) { - unsigned char *s = getenv("serial#"); + char *s = getenv("serial#"); uint pvr = get_pvr(); if (pvr == PVR_405GPR_RB) { diff --git a/board/atc/flash.c b/board/atc/flash.c index 26b7c80..2ab60e8 100644 --- a/board/atc/flash.c +++ b/board/atc/flash.c @@ -181,7 +181,7 @@ void flash_print_info (flash_info_t *info) int i; uchar *boottype; uchar *bootletter; - uchar *fmt; + char *fmt; uchar botbootletter[] = "B"; uchar topbootletter[] = "T"; uchar botboottype[] = "bottom boot sector"; diff --git a/board/barco/barco.c b/board/barco/barco.c index 613e722..becbd0a 100644 --- a/board/barco/barco.c +++ b/board/barco/barco.c @@ -174,7 +174,7 @@ unsigned update_flash (unsigned char *buf) switch ((*buf) & 0x3) { case TRY_WORKING: printf ("found 3 and converted it to 2\n"); - write_flash (buf, (*buf) & 0xFE); + write_flash ((char *)buf, (*buf) & 0xFE); *((unsigned char *)0xFF800000) = 0xF0; udelay (100); printf ("buf [%#010x] %#010x\n", buf, (*buf)); diff --git a/board/c2mon/c2mon.c b/board/c2mon/c2mon.c index 873ff8c..ca8eb0c 100644 --- a/board/c2mon/c2mon.c +++ b/board/c2mon/c2mon.c @@ -91,7 +91,7 @@ const uint sdram_table[] = int checkboard (void) { - unsigned char *s = getenv ("serial#"); + unsigned char *s = (unsigned char *)getenv ("serial#"); puts ("Board: TTTech C2MON "); @@ -155,7 +155,7 @@ long int initdram (int board_type) * try 8 column mode */ size8 = dram_size (CFG_MAMR_8COL, - (ulong *)SDRAM_BASE2_PRELIM, + SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -164,7 +164,7 @@ long int initdram (int board_type) * try 9 column mode */ size9 = dram_size (CFG_MAMR_9COL, - (ulong *) SDRAM_BASE2_PRELIM, + SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ diff --git a/board/cray/L1/L1.c b/board/cray/L1/L1.c index fb28c42..a7114eb 100644 --- a/board/cray/L1/L1.c +++ b/board/cray/L1/L1.c @@ -133,7 +133,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ int misc_init_r (void) { - unsigned char *s, *e; + char *s, *e; image_header_t *hdr; time_t timestamp; struct rtc_time tm; @@ -146,7 +146,7 @@ int misc_init_r (void) #define FACTORY_SETTINGS 0xFFFC0000 if ((s = getenv ("ethaddr")) == NULL) { - e = (unsigned char *) (FACTORY_SETTINGS); + e = (char *) (FACTORY_SETTINGS); if (*(e + 0) != '0' || *(e + 1) != '0' || *(e + 2) != ':' @@ -314,7 +314,7 @@ static u8 *dhcp_env_update (u8 thing, u8 * pop) { setenv (Things[thing].envname, Things[thing].dhcpvalue); } - return (Things[thing].dhcpvalue); + return ((u8 *)(Things[thing].dhcpvalue)); } /* ------------------------------------------------------------------------- */ diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c index b425d63..5f2c705 100644 --- a/board/dave/PPChameleonEVB/PPChameleonEVB.c +++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c @@ -185,7 +185,7 @@ int misc_init_r (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/eltec/bab7xx/misc.c b/board/eltec/bab7xx/misc.c index b50d11b..6a24807 100644 --- a/board/eltec/bab7xx/misc.c +++ b/board/eltec/bab7xx/misc.c @@ -58,7 +58,7 @@ unsigned char scsi_sym53c8xx_ccf = 0x13; int misc_init_r (void) { revinfo eerev; - u_char *ptr; + char *ptr; u_int i, l, initSrom, copyNv; char buf[256]; char hex[23] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, @@ -139,7 +139,7 @@ int misc_init_r (void) if (strcmp (eerev.magic, "ELTEC") != 0) { /* srom is not initialized -> create a default revision info */ - for (i = 0, ptr = (u_char *)&eerev; i < sizeof(revinfo); i++) + for (i = 0, ptr = (char *)&eerev; i < sizeof(revinfo); i++) *ptr++ = 0x00; strcpy(eerev.magic, "ELTEC"); eerev.revrev[0] = 1; diff --git a/board/eltec/elppc/eepro100_srom.c b/board/eltec/elppc/eepro100_srom.c index 9754c1d..f021c50 100644 --- a/board/eltec/elppc/eepro100_srom.c +++ b/board/eltec/elppc/eepro100_srom.c @@ -57,7 +57,7 @@ int eepro100_srom_store (unsigned short *source) /* get onboard network iobase */ pci_read_config_dword(PCI_BDF(0,0x10,0), PCI_BASE_ADDRESS_0, - &onboard_dev.iobase); + (unsigned int *)&onboard_dev.iobase); onboard_dev.iobase &= ~0xf; source[63] = eepro100_srom_checksum (source); diff --git a/board/eltec/mhpc/mhpc.c b/board/eltec/mhpc/mhpc.c index bc3d9f4..0ffbdf0 100644 --- a/board/eltec/mhpc/mhpc.c +++ b/board/eltec/mhpc/mhpc.c @@ -160,7 +160,7 @@ int misc_init_r (void) int i; /* check revision data */ - eeprom_read (CFG_I2C_EEPROM_ADDR, 480, (char *) &mhpcRevInfo, 32); + eeprom_read (CFG_I2C_EEPROM_ADDR, 480, (uchar *) &mhpcRevInfo, 32); if (strncmp ((char *) &mhpcRevInfo.board[2], "MHPC", 4) != 0) { printf ("Enter revision number (0-9): %c ", @@ -228,7 +228,7 @@ int misc_init_r (void) } /* setup new revision data */ - eeprom_write (CFG_I2C_EEPROM_ADDR, 480, (char *) &mhpcRevInfo, + eeprom_write (CFG_I2C_EEPROM_ADDR, 480, (uchar *) &mhpcRevInfo, 32); } @@ -422,8 +422,8 @@ void *video_hw_init (void) immap_t *immr = (immap_t *) CFG_IMMR; /* enable video only on CLUT value */ - if ((penv = getenv ("clut")) != NULL) - clut = (u_int) simple_strtoul (penv, NULL, 10); + if ((penv = (uchar *)getenv ("clut")) != NULL) + clut = (u_int) simple_strtoul ((char *)penv, NULL, 10); else return NULL; diff --git a/board/emk/common/flash.c b/board/emk/common/flash.c index 28fe29d..d6161bf 100644 --- a/board/emk/common/flash.c +++ b/board/emk/common/flash.c @@ -165,7 +165,7 @@ void flash_print_info (flash_info_t *info) int i; uchar *boottype; uchar *bootletter; - uchar *fmt; + char *fmt; uchar botbootletter[] = "B"; uchar topbootletter[] = "T"; uchar botboottype[] = "bottom boot sector"; diff --git a/board/emk/common/vpd.c b/board/emk/common/vpd.c index cbb7f8f..8a3a12b 100644 --- a/board/emk/common/vpd.c +++ b/board/emk/common/vpd.c @@ -69,11 +69,11 @@ void read_factory_r (void) /*printf ("%s\n", buf); */ /* search for our specific entry */ if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19)) { - setenv ("ethaddr", buf + 19); + setenv ("ethaddr", (char *)(buf + 19)); } else if (!strncmp ((char *) buf, "[BOARD/SERIAL] ", 15)) { - setenv ("serial#", buf + 15); + setenv ("serial#", (char *)(buf + 15)); } else if (!strncmp ((char *) buf, "[BOARD/TYPE] ", 13)) { - setenv ("board_id", buf + 13); + setenv ("board_id", (char *)(buf + 13)); } } } diff --git a/board/eric/eric.c b/board/eric/eric.c index 02fe8dc..5413ae1 100644 --- a/board/eric/eric.c +++ b/board/eric/eric.c @@ -85,8 +85,8 @@ int board_early_init_f (void) int checkboard (void) { - unsigned char *s = getenv ("serial#"); - unsigned char *e; + char *s = getenv ("serial#"); + char *e; puts ("Board: "); diff --git a/board/esd/adciop/adciop.c b/board/esd/adciop/adciop.c index 93bc843..7a11a12 100644 --- a/board/esd/adciop/adciop.c +++ b/board/esd/adciop/adciop.c @@ -60,7 +60,7 @@ int board_early_init_f (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); diff --git a/board/esd/ar405/ar405.c b/board/esd/ar405/ar405.c index 14b0e42..3aac3c6 100644 --- a/board/esd/ar405/ar405.c +++ b/board/esd/ar405/ar405.c @@ -155,7 +155,7 @@ int checkboard (void) int index; int len; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); const unsigned char *fpga; diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c index 012505e..03ae7fd 100644 --- a/board/esd/ash405/ash405.c +++ b/board/esd/ash405/ash405.c @@ -193,7 +193,7 @@ int misc_init_r (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esd/canbt/canbt.c b/board/esd/canbt/canbt.c index ab49249..2ced6cb 100644 --- a/board/esd/canbt/canbt.c +++ b/board/esd/canbt/canbt.c @@ -156,7 +156,7 @@ int checkboard (void) { int index; int len; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c index 0604a4e..1dceb3a 100644 --- a/board/esd/common/auto_update.c +++ b/board/esd/common/auto_update.c @@ -103,7 +103,7 @@ int au_check_cksum_valid(int i, long nbytes) /* check the data CRC */ checksum = ntohl(hdr->ih_dcrc); - if (crc32 (0, (char *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size)) + if (crc32 (0, (uchar *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size)) != checksum) { printf ("Image %s bad data checksum\n", au_image[i].name); return -1; @@ -140,7 +140,7 @@ int au_check_header_valid(int i, long nbytes) checksum = ntohl(hdr->ih_hcrc); hdr->ih_hcrc = 0; - if (crc32 (0, (char *)hdr, sizeof(*hdr)) != checksum) { + if (crc32 (0, (uchar *)hdr, sizeof(*hdr)) != checksum) { printf ("Image %s bad header checksum\n", au_image[i].name); return -1; } @@ -283,12 +283,12 @@ int au_do_update(int i, long sz) */ if (au_image[i].type != AU_NAND) { debug ("flash_write(%p, %lx %x)\n", addr, start, nbytes); - rc = flash_write(addr, start, nbytes); + rc = flash_write((uchar *)addr, start, nbytes); } else { #if (CONFIG_COMMANDS & CFG_CMD_NAND) debug ("nand_rw(%p, %lx %x)\n", addr, start, nbytes); rc = nand_rw(nand_dev_desc, NANDRW_WRITE | NANDRW_JFFS2, - start, nbytes, &total, addr); + start, nbytes, (size_t *)&total, (uchar *)addr); debug ("nand_rw: ret=%x total=%d nbytes=%d\n", rc, total, nbytes); #endif } @@ -301,12 +301,12 @@ int au_do_update(int i, long sz) * check the dcrc of the copy */ if (au_image[i].type != AU_NAND) { - rc = crc32 (0, (char *)(start + off), ntohl(hdr->ih_size)); + rc = crc32 (0, (uchar *)(start + off), ntohl(hdr->ih_size)); } else { #if (CONFIG_COMMANDS & CFG_CMD_NAND) rc = nand_rw(nand_dev_desc, NANDRW_READ | NANDRW_JFFS2 | NANDRW_JFFS2_SKIP, - start, nbytes, &total, addr); - rc = crc32 (0, (char *)(addr + off), ntohl(hdr->ih_size)); + start, nbytes, (size_t *)&total, (uchar *)addr); + rc = crc32 (0, (uchar *)(addr + off), ntohl(hdr->ih_size)); #endif } if (rc != ntohl(hdr->ih_dcrc)) { diff --git a/board/esd/cpci2dp/cpci2dp.c b/board/esd/cpci2dp/cpci2dp.c index 0949a7d..727640e 100644 --- a/board/esd/cpci2dp/cpci2dp.c +++ b/board/esd/cpci2dp/cpci2dp.c @@ -95,7 +95,7 @@ int misc_init_r (void) */ int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index f27668d..2ab9673 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -440,7 +440,7 @@ int checkboard (void) int index; int len; #endif - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); unsigned short ver; @@ -468,7 +468,7 @@ int checkboard (void) #endif if (ctermm2()) { - unsigned char str[4]; + char str[4]; /* * Read board-id and save in env-variable @@ -664,7 +664,7 @@ int do_onewire(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) int result; int i; unsigned char ow_id[6]; - unsigned char str[32]; + char str[32]; unsigned char ow_crc; /* @@ -717,10 +717,10 @@ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) IPaddr_t ipaddr; buf = malloc(CFG_ENV_SIZE_2); - if (eeprom_read(CFG_I2C_EEPROM_ADDR_2, 0, buf, CFG_ENV_SIZE_2)) { + if (eeprom_read(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CFG_ENV_SIZE_2)) { puts("\nError reading backplane EEPROM!\n"); } else { - crc = crc32(0, buf+4, CFG_ENV_SIZE_2-4); + crc = crc32(0, (uchar *)(buf+4), CFG_ENV_SIZE_2-4); if (crc != *(ulong *)buf) { printf("ERROR: crc mismatch %08lx %08lx\n", crc, *(ulong *)buf); return -1; @@ -766,7 +766,7 @@ U_BOOT_CMD( int do_set_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { char *buf; - unsigned char str[32]; + char str[32]; ulong crc; if (argc < 2) { @@ -779,10 +779,10 @@ int do_set_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) memset(buf, 0, CFG_ENV_SIZE_2); sprintf(str, "bp_ip=%s", argv[1]); strcpy(buf+4, str); - crc = crc32(0, buf+4, CFG_ENV_SIZE_2-4); + crc = crc32(0, (uchar *)(buf+4), CFG_ENV_SIZE_2-4); *(ulong *)buf = crc; - if (eeprom_write(CFG_I2C_EEPROM_ADDR_2, 0, buf, CFG_ENV_SIZE_2)) { + if (eeprom_write(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CFG_ENV_SIZE_2)) { puts("\nError writing backplane EEPROM!\n"); } diff --git a/board/esd/cpci5200/cpci5200.c b/board/esd/cpci5200/cpci5200.c index 01c4171..6c98f13 100644 --- a/board/esd/cpci5200/cpci5200.c +++ b/board/esd/cpci5200/cpci5200.c @@ -105,9 +105,9 @@ long int initdram(int board_type) /* find RAM size using SDRAM CS0 only */ sdram_start(0); - test1 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000); sdram_start(1); - test2 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { sdram_start(0); diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index 68f121d..e4b062b 100644 --- a/board/esd/cpci750/cpci750.c +++ b/board/esd/cpci750/cpci750.c @@ -555,7 +555,7 @@ unsigned long long pattern[] = { int mem_test_data (void) { unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START; - unsigned long long temp64; + unsigned long long temp64 = 0; int num_patterns = sizeof (pattern) / sizeof (pattern[0]); int i; unsigned int hi, lo; @@ -662,7 +662,7 @@ int mem_march (volatile unsigned long long *base, unsigned long long wmask, short read, short write) { unsigned int i; - unsigned long long temp; + unsigned long long temp = 0; unsigned int hitemp, lotemp, himask, lomask; for (i = 0; i < size; i++) { diff --git a/board/esd/cpci750/mv_eth.c b/board/esd/cpci750/mv_eth.c index e2719b9..880528f 100644 --- a/board/esd/cpci750/mv_eth.c +++ b/board/esd/cpci750/mv_eth.c @@ -267,8 +267,9 @@ void mv6436x_eth_initialize (bd_t * bis) dev->send = (void *) db64360_eth_transmit; dev->recv = (void *) db64360_eth_poll; - dev->priv = (void *) ethernet_private = + ethernet_private = calloc (sizeof (*ethernet_private), 1); + dev->priv = (void *) ethernet_private; if (!ethernet_private) { printf ("%s: %s allocation failure, %s\n", __FUNCTION__, dev->name, @@ -281,8 +282,9 @@ void mv6436x_eth_initialize (bd_t * bis) memcpy (ethernet_private->port_mac_addr, dev->enetaddr, 6); /* set pointer to memory for stats data structure etc... */ - ethernet_private->port_private = (void *) port_private = + port_private = calloc (sizeof (*ethernet_private), 1); + ethernet_private->port_private = (void *)port_private; if (!port_private) { printf ("%s: %s allocation failure, %s\n", __FUNCTION__, dev->name, diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c index 3d1f1fa..7bf7bb5 100644 --- a/board/esd/cpciiser4/cpciiser4.c +++ b/board/esd/cpciiser4/cpciiser4.c @@ -153,7 +153,7 @@ int checkboard (void) { int index; int len; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); diff --git a/board/esd/dasa_sim/cmd_dasa_sim.c b/board/esd/dasa_sim/cmd_dasa_sim.c index 9edb3af..89a4aaf 100644 --- a/board/esd/dasa_sim/cmd_dasa_sim.c +++ b/board/esd/dasa_sim/cmd_dasa_sim.c @@ -111,7 +111,7 @@ static void showPci9054 (void) for (i = 0; i < 4; i++) { pci_read_config_dword (CFG_PCI9054_DEV_FN, l * 16 + i * 4, - &val); + (unsigned int *)&val); printf ("%08x ", val); } printf ("\n"); diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c index 57a971f..2f8ab1a 100644 --- a/board/esd/dasa_sim/dasa_sim.c +++ b/board/esd/dasa_sim/dasa_sim.c @@ -162,7 +162,7 @@ int checkboard (void) { int index; int len; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); int fpga; unsigned short val; diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c index 056063e..fd51f7f 100644 --- a/board/esd/dp405/dp405.c +++ b/board/esd/dp405/dp405.c @@ -100,7 +100,7 @@ int misc_init_r (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); unsigned char trans[16] = {0x0,0x8,0x4,0xc,0x2,0xa,0x6,0xe, 0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf}; diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c index 7db2a60..26e8341 100644 --- a/board/esd/du405/du405.c +++ b/board/esd/du405/du405.c @@ -162,7 +162,7 @@ int checkboard (void) { int index; int len; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); diff --git a/board/esd/hub405/hub405.c b/board/esd/hub405/hub405.c index bbd8555..e77dba8 100644 --- a/board/esd/hub405/hub405.c +++ b/board/esd/hub405/hub405.c @@ -210,7 +210,7 @@ int checkboard (void) { DECLARE_GLOBAL_DATA_PTR; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esd/ocrtc/ocrtc.c b/board/esd/ocrtc/ocrtc.c index ac032ef..261b8a5 100644 --- a/board/esd/ocrtc/ocrtc.c +++ b/board/esd/ocrtc/ocrtc.c @@ -74,7 +74,7 @@ int misc_init_f (void) */ int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); diff --git a/board/esd/pci405/cmd_pci405.c b/board/esd/pci405/cmd_pci405.c index e1ca583..0315c3d 100644 --- a/board/esd/pci405/cmd_pci405.c +++ b/board/esd/pci405/cmd_pci405.c @@ -91,7 +91,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) pci_read_config_dword(PCIDEVID_405GP, i, ptr++); } ptr = (unsigned int *)PCI_REGS_ADDR; - *ptr = crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4); + *ptr = crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4); printf("\nStoring PCI Configuration Regs...\n"); } else { @@ -874,7 +874,7 @@ int do_savepci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) pci_read_config_dword(PCIDEVID_405GP, i, ptr++); } ptr = (unsigned int *)PCI_REGS_ADDR; - *ptr = crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4); + *ptr = crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4); printf("\nStoring PCI Configuration Regs...\n"); @@ -896,7 +896,7 @@ int do_restorepci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * Rewrite pci config regs (only after soft-reset with magic set) */ ptr = (unsigned int *)PCI_REGS_ADDR; - if (crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) { + if (crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) { puts("Restoring PCI Configurations Regs!\n"); ptr = (unsigned int *)PCI_REGS_ADDR + 1; for (i=0; i<0x40; i+=4) { diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c index d1b6807..4be4d7e 100644 --- a/board/esd/pci405/pci405.c +++ b/board/esd/pci405/pci405.c @@ -275,7 +275,7 @@ int misc_init_r (void) * Rewrite pci config regs (only after soft-reset with magic set) */ ptr = (unsigned int *)PCI_REGS_ADDR; - if (crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) { + if (crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) { puts("Restoring PCI Configurations Regs!\n"); ptr = (unsigned int *)PCI_REGS_ADDR + 1; for (i=0; i<0x40; i+=4) { @@ -322,7 +322,7 @@ int checkboard (void) { DECLARE_GLOBAL_DATA_PTR; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esd/pf5200/flash.c b/board/esd/pf5200/flash.c index bfbd090..53afbc0 100644 --- a/board/esd/pf5200/flash.c +++ b/board/esd/pf5200/flash.c @@ -122,7 +122,7 @@ static flash_info_t *flash_get_info(ulong base) { void flash_print_info(flash_info_t * info) { int i; - uchar *fmt; + char *fmt; if (info->flash_id == FLASH_UNKNOWN) { printf("missing or unknown FLASH type\n"); diff --git a/board/esd/pf5200/pf5200.c b/board/esd/pf5200/pf5200.c index fa71c79..2b47012 100644 --- a/board/esd/pf5200/pf5200.c +++ b/board/esd/pf5200/pf5200.c @@ -105,9 +105,9 @@ long int initdram(int board_type) /* find RAM size using SDRAM CS0 only */ sdram_start(0); - test1 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000); sdram_start(1); - test2 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { sdram_start(0); diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c index e3eff31..16f2360 100644 --- a/board/esd/plu405/plu405.c +++ b/board/esd/plu405/plu405.c @@ -203,7 +203,7 @@ int misc_init_r (void) */ int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esd/pmc405/pmc405.c b/board/esd/pmc405/pmc405.c index a72547d..33b5f77 100644 --- a/board/esd/pmc405/pmc405.c +++ b/board/esd/pmc405/pmc405.c @@ -107,7 +107,7 @@ int misc_init_r (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c index 9cea69f..eda3fd9 100644 --- a/board/esd/voh405/voh405.c +++ b/board/esd/voh405/voh405.c @@ -268,7 +268,7 @@ int misc_init_r (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c index 09c4d36..db24122 100644 --- a/board/esd/wuh405/wuh405.c +++ b/board/esd/wuh405/wuh405.c @@ -193,7 +193,7 @@ int misc_init_r (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/esteem192e/esteem192e.c b/board/esteem192e/esteem192e.c index 5c3e9b4..3959eea 100644 --- a/board/esteem192e/esteem192e.c +++ b/board/esteem192e/esteem192e.c @@ -147,8 +147,8 @@ long int initdram (int board_type) * Check Bank 0 Memory Size for re-configuration * */ - size_b0 = get_ram_size ((ulong *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); - size_b1 = get_ram_size ((ulong *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); + size_b0 = get_ram_size ( (long *)SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); + size_b1 = get_ram_size ( (long *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); printf ("\nbank 0 size %lu\nbank 1 size %lu\n", size_b0, size_b1); diff --git a/board/etx094/etx094.c b/board/etx094/etx094.c index efe7cb2..dba3c11 100644 --- a/board/etx094/etx094.c +++ b/board/etx094/etx094.c @@ -92,8 +92,8 @@ int checkboard (void) { DECLARE_GLOBAL_DATA_PTR; - unsigned char *s = getenv ("serial#"); - unsigned char *e; + char *s = getenv ("serial#"); + char *e; puts ("Board: "); @@ -186,7 +186,7 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -194,7 +194,7 @@ long int initdram (int board_type) /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ @@ -215,7 +215,7 @@ long int initdram (int board_type) * but then only half the real size will be used.] */ size_b1 = - dram_size (memctl->memc_mamr, (ulong *) SDRAM_BASE3_PRELIM, + dram_size (memctl->memc_mamr, (long *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); /* debug ("SDRAM Bank 1: %ld MB\n", size8 >> 20); */ } else { diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c index f0743fa..a248cad 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 ecc3762..beb6db1 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 0abc7d4..69882f5 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 7ca6f0a..6ab23dc 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 22cb809..c62b647 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 5131339..2b9a469 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"); diff --git a/board/g2000/g2000.c b/board/g2000/g2000.c index 5967e90..3f78753 100644 --- a/board/g2000/g2000.c +++ b/board/g2000/g2000.c @@ -90,7 +90,7 @@ int misc_init_r (void) */ int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/gen860t/gen860t.c b/board/gen860t/gen860t.c index f1d173e..b7a1b56 100644 --- a/board/gen860t/gen860t.c +++ b/board/gen860t/gen860t.c @@ -128,8 +128,8 @@ int checkboard (void) { DECLARE_GLOBAL_DATA_PTR; - unsigned char *s; - unsigned char buf[64]; + char *s; + char buf[64]; int i; i = getenv_r ("board_id", buf, sizeof (buf)); @@ -266,7 +266,7 @@ int misc_init_r (void) int last_stage_init (void) { #if !defined(CONFIG_SC) - unsigned char buf[256]; + char buf[256]; int i; /* diff --git a/board/genietv/flash.c b/board/genietv/flash.c index f12d0be..1c1728b 100644 --- a/board/genietv/flash.c +++ b/board/genietv/flash.c @@ -188,12 +188,11 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) #endif switch (value) { - case 0x01: - case AMD_MANUFACT: + case 0x1: /* AMD_MANUFACT */ info->flash_id = FLASH_MAN_AMD; break; - case FUJ_MANUFACT: + case 0x4: /* FUJ_MANUFACT */ info->flash_id = FLASH_MAN_FUJ; break; diff --git a/board/genietv/genietv.c b/board/genietv/genietv.c index c19841a..5f8c899 100644 --- a/board/genietv/genietv.c +++ b/board/genietv/genietv.c @@ -187,14 +187,14 @@ long int initdram (int board_type) PrintState (); #endif /* printf ("\nChecking bank1..."); */ - size8 = dram_size (CFG_MBMR_8COL, (ulong *) SDRAM_BASE1_PRELIM, + size8 = dram_size (CFG_MBMR_8COL, (long *) SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); size_b0 = size8; /* printf ("\nChecking bank2..."); */ size_b1 = - dram_size (memctl->memc_mbmr, (ulong *) SDRAM_BASE2_PRELIM, + dram_size (memctl->memc_mbmr, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); /* diff --git a/board/gth/flash.c b/board/gth/flash.c index c8b56fb..41a5c50 100644 --- a/board/gth/flash.c +++ b/board/gth/flash.c @@ -261,7 +261,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) #if 0 ulong base = (ulong)addr; #endif - uchar value; + ulong value; /* Write auto select command: read Manufacturer ID */ #if 0 @@ -278,7 +278,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) switch (value) { - case AMD_MANUFACT:case 0x01: + case AMD_MANUFACT: info->flash_id = FLASH_MAN_AMD; break; diff --git a/board/gth/gth.c b/board/gth/gth.c index 6f972ce..b1fcbf5 100644 --- a/board/gth/gth.c +++ b/board/gth/gth.c @@ -589,7 +589,7 @@ int misc_init_r (void) (Rx[8] != ':') | (Rx[11] != ':') | (Rx[14] != ':')) { printf ("*** ethernet addr invalid, using default ***\n"); } else { - setenv ("ethaddr", Rx); + setenv ("ethaddr", (char *)Rx); } return (0); } diff --git a/board/gw8260/gw8260.c b/board/gw8260/gw8260.c index 163d58c..2719a95 100644 --- a/board/gw8260/gw8260.c +++ b/board/gw8260/gw8260.c @@ -320,7 +320,7 @@ unsigned long long pattern[] = { int mem_test_data (void) { unsigned long long *pmem = (unsigned long long *) CFG_SDRAM_BASE; - unsigned long long temp64; + unsigned long long temp64 = 0; int num_patterns = sizeof (pattern) / sizeof (pattern[0]); int i; unsigned int hi, lo; @@ -427,7 +427,7 @@ int mem_march (volatile unsigned long long *base, unsigned long long wmask, short read, short write) { unsigned int i; - unsigned long long temp; + unsigned long long temp = 0; unsigned int hitemp, lotemp, himask, lomask; for (i = 0; i < size; i++) { diff --git a/board/hermes/hermes.c b/board/hermes/hermes.c index 7490324..e95d9ee 100644 --- a/board/hermes/hermes.c +++ b/board/hermes/hermes.c @@ -107,8 +107,8 @@ int checkboard (void) { DECLARE_GLOBAL_DATA_PTR; - unsigned char *s = getenv ("serial#"); - unsigned char *e; + char *s = getenv ("serial#"); + char *e; puts ("Board: "); @@ -179,7 +179,7 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -187,7 +187,7 @@ long int initdram (int board_type) /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ diff --git a/board/hymod/eeprom.c b/board/hymod/eeprom.c index 15eb48e..c9b9b18 100644 --- a/board/hymod/eeprom.c +++ b/board/hymod/eeprom.c @@ -58,7 +58,7 @@ hymod_eeprom_load (int which, hymod_eeprom_t *ep) eeprom_read (dev_addr, offset, (uchar *)&crc, sizeof (ulong)); offset += sizeof (ulong); - if (crc32 (crc32 (0, (char *)&hdr, sizeof hdr), data, len) != crc) + if (crc32 (crc32 (0, (uchar *)&hdr, sizeof hdr), data, len) != crc) return (0); ep->ver = hdr.ver; @@ -260,7 +260,7 @@ uint_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp) char *eval; ulong lval; - lval = simple_strtol (val, &eval, 10); + lval = simple_strtol ((char *)val, &eval, 10); if ((uchar *)eval == val || *eval != '\0') { printf ("%s rec (%s) is not a valid uint\n", rp->name, val); @@ -315,12 +315,12 @@ static uchar * date_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp) { hymod_date_t date; - uchar *p = val; + char *p = (char *)val; char *ep; ulong lval; lval = simple_strtol (p, &ep, 10); - if ((uchar *)ep == p || *ep++ != '-') { + if (ep == p || *ep++ != '-') { bad_date: printf ("%s rec (%s) is not a valid date\n", rp->name, val); return (NULL); @@ -330,12 +330,12 @@ bad_date: date.year = lval; lval = simple_strtol (p = ep, &ep, 10); - if ((uchar *)ep == p || *ep++ != '-' || lval == 0 || lval > 12) + if (ep == p || *ep++ != '-' || lval == 0 || lval > 12) goto bad_date; date.month = lval; lval = simple_strtol (p = ep, &ep, 10); - if ((uchar *)ep == p || *ep != '\0' || lval == 0 || lval > 31) + if (ep == p || *ep != '\0' || lval == 0 || lval > 31) goto bad_date; date.day = lval; @@ -359,7 +359,7 @@ string_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp) { uint len; - if ((len = strlen (val)) > rp->maxlen) { + if ((len = strlen ((char *)val)) > rp->maxlen) { printf ("%s rec (%s) string is too long (%d>%d)\n", rp->name, val, len, rp->maxlen); return (NULL); @@ -387,7 +387,7 @@ bytes_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp) for (nbytes = 0, p = val; *p != '\0'; p = (uchar *)ep) { ulong lval; - lval = simple_strtol (p, &ep, 10); + lval = simple_strtol ((char *)p, &ep, 10); if ((uchar *)ep == p || (*ep != '\0' && *ep != ',') || \ lval >= 256) { printf ("%s rec (%s) byte array has invalid uint\n", @@ -451,7 +451,7 @@ eerec_callback (uchar *name, uchar *val) eerec_map_t *rp; for (rp = eerec_map; rp < &eerec_map[neerecs]; rp++) - if (strcmp (name, rp->name) == 0) + if (strcmp ((char *)name, rp->name) == 0) break; if (rp >= &eerec_map[neerecs]) diff --git a/board/hymod/env.c b/board/hymod/env.c index f58aec2..f9e1421 100644 --- a/board/hymod/env.c +++ b/board/hymod/env.c @@ -38,7 +38,7 @@ env_callback (uchar *name, uchar *value) char ov[CFG_CBSIZE], nv[CFG_CBSIZE], *p, *q, *nn, c, *curver, *newver; int override = 1, append = 0, remove = 0, nnl, ovl, nvl; - nn = name; + nn = (char *)name; if (*nn == '-') { override = 0; @@ -68,7 +68,7 @@ env_callback (uchar *name, uchar *value) return (0); } - p = value; + p = (char *)value; q = nv; while ((c = *p) == ' ' || c == '\t') diff --git a/board/icecube/flash.c b/board/icecube/flash.c index 4ae71e6..713011c 100644 --- a/board/icecube/flash.c +++ b/board/icecube/flash.c @@ -139,7 +139,7 @@ void flash_print_info (flash_info_t *info) int i; uchar *boottype; uchar *bootletter; - uchar *fmt; + char *fmt; uchar botbootletter[] = "B"; uchar topbootletter[] = "T"; uchar botboottype[] = "bottom boot sector"; diff --git a/board/icecube/icecube.c b/board/icecube/icecube.c index 7c9a92a..1f1a74c 100644 --- a/board/icecube/icecube.c +++ b/board/icecube/icecube.c @@ -107,9 +107,9 @@ long int initdram (int board_type) /* find RAM size using SDRAM CS0 only */ sdram_start(0); - test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); sdram_start(1); - test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { sdram_start(0); dramsize = test1; @@ -135,10 +135,10 @@ long int initdram (int board_type) /* find RAM size using SDRAM CS1 only */ if (!dramsize) sdram_start(0); - test2 = test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); if (!dramsize) { sdram_start(1); - test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); } if (test1 > test2) { sdram_start(0); @@ -207,9 +207,9 @@ long int initdram (int board_type) /* find RAM size */ sdram_start(0); - test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); sdram_start(1); - test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { sdram_start(0); dramsize = test1; diff --git a/board/icu862/flash.c b/board/icu862/flash.c index 6315bd9..ca5bcf3 100644 --- a/board/icu862/flash.c +++ b/board/icu862/flash.c @@ -251,7 +251,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) value = addr[1]; /* device ID */ - switch (value) { + switch ((unsigned long)value) { case AMD_ID_F040B: info->flash_id += FLASH_AM040; info->sector_count = 8; diff --git a/board/icu862/icu862.c b/board/icu862/icu862.c index b41ebae..8da9d1c 100644 --- a/board/icu862/icu862.c +++ b/board/icu862/icu862.c @@ -143,7 +143,7 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE1_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -151,7 +151,7 @@ long int initdram (int board_type) /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE1_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ diff --git a/board/ip860/ip860.c b/board/ip860/ip860.c index 5b634e4..9dd809b 100644 --- a/board/ip860/ip860.c +++ b/board/ip860/ip860.c @@ -114,10 +114,10 @@ int checkboard (void) puts ("Board: "); - i = getenv_r ("serial#", buf, sizeof (buf)); + i = getenv_r ("serial#", (char *)buf, sizeof (buf)); s = (i > 0) ? buf : NULL; - if (!s || strncmp (s, "IP860", 5)) { + if (!s || strncmp ((char *)s, "IP860", 5)) { puts ("### No HW ID - assuming IP860"); } else { for (e = s; *e; ++e) { @@ -190,9 +190,9 @@ long int initdram (int board_type) * Check SDRAM Memory Size */ if (ip860_get_dram_size() == 16) - size = dram_size (refresh_val | 0x00804114, (ulong *)SDRAM_BASE, SDRAM_MAX_SIZE); + size = dram_size (refresh_val | 0x00804114, SDRAM_BASE, SDRAM_MAX_SIZE); else - size = dram_size (refresh_val | 0x00906114, (ulong *)SDRAM_BASE, SDRAM_MAX_SIZE); + size = dram_size (refresh_val | 0x00906114, SDRAM_BASE, SDRAM_MAX_SIZE); udelay (1000); diff --git a/board/iphase4539/iphase4539.c b/board/iphase4539/iphase4539.c index e50250e..0ca9cf5 100644 --- a/board/iphase4539/iphase4539.c +++ b/board/iphase4539/iphase4539.c @@ -342,7 +342,7 @@ int hwc_serial_number (void) { int sn = -1; - if (!seeprom_read (0xa0, (char *) &sn, sizeof (sn))) { + if (!seeprom_read (0xa0, (uchar *) &sn, sizeof (sn))) { sn = cpu_to_le32 (sn); } return sn; @@ -351,7 +351,7 @@ int hwc_mac_address (char *str) { char mac[6]; - if (!seeprom_read (0xb0, mac, sizeof (mac))) { + if (!seeprom_read (0xb0, (uchar *)mac, sizeof (mac))) { sprintf (str, "%02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); } else { diff --git a/board/ispan/ispan.c b/board/ispan/ispan.c index fd34899..d39b8cd 100644 --- a/board/ispan/ispan.c +++ b/board/ispan/ispan.c @@ -290,7 +290,7 @@ static int hwc_serial_number (void) { int sn = -1; - if (!seeprom_read (0xa0, (char *) &sn, sizeof (sn))) { + if (!seeprom_read (0xa0, (uchar *) &sn, sizeof (sn))) { sn = cpu_to_le32 (sn); } return sn; @@ -300,7 +300,7 @@ static int hwc_mac_address (char *str) { char mac[6]; - if (!seeprom_read (0xb0, mac, sizeof (mac))) { + if (!seeprom_read (0xb0, (uchar *)mac, sizeof (mac))) { sprintf (str, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); } else { diff --git a/board/ivm/ivm.c b/board/ivm/ivm.c index cb661c9..7927ea9 100644 --- a/board/ivm/ivm.c +++ b/board/ivm/ivm.c @@ -251,7 +251,7 @@ long int initdram (int board_type) * Check Bank 0 Memory Size for re-configuration */ size_b0 = - dram_size (CFG_MBMR_8COL, (ulong *) SDRAM_BASE3_PRELIM, + dram_size (CFG_MBMR_8COL, (long *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); memctl->memc_mbmr = CFG_MBMR_8COL | MBMR_PTBE; diff --git a/board/kup/common/load_sernum_ethaddr.c b/board/kup/common/load_sernum_ethaddr.c index 39ee124..b7b7499 100644 --- a/board/kup/common/load_sernum_ethaddr.c +++ b/board/kup/common/load_sernum_ethaddr.c @@ -54,9 +54,9 @@ void load_sernum_ethaddr (void) { unsigned char *hwi; - unsigned char *var; + char *var; unsigned char hwi_stack[CFG_HWINFO_SIZE]; - unsigned char *p; + char *p; hwi = (unsigned char *) (CFG_FLASH_BASE + CFG_HWINFO_OFFSET); if (*((unsigned long *) hwi) != (unsigned long) CFG_HWINFO_MAGIC) { @@ -68,11 +68,11 @@ void load_sernum_ethaddr (void) /* ** ethaddr */ - var = strstr (hwi_stack, ETHADDR_TOKEN); + var = strstr ((char *)hwi_stack, ETHADDR_TOKEN); if (var) { var += sizeof (ETHADDR_TOKEN) - 1; p = strchr (var, '\r'); - if (p < hwi + CFG_HWINFO_SIZE) { + if ((unsigned char *)p < hwi + CFG_HWINFO_SIZE) { *p = '\0'; setenv ("ethaddr", var); *p = '\r'; @@ -81,11 +81,11 @@ void load_sernum_ethaddr (void) /* ** lcd */ - var = strstr (hwi_stack, LCD_TOKEN); + var = strstr ((char *)hwi_stack, LCD_TOKEN); if (var) { var += sizeof (LCD_TOKEN) - 1; p = strchr (var, '\r'); - if (p < hwi + CFG_HWINFO_SIZE) { + if ((unsigned char *)p < hwi + CFG_HWINFO_SIZE) { *p = '\0'; setenv ("lcd", var); *p = '\r'; diff --git a/board/kup/kup4k/kup4k.c b/board/kup/kup4k/kup4k.c index c352c8b..e621c43 100644 --- a/board/kup/kup4k/kup4k.c +++ b/board/kup/kup4k/kup4k.c @@ -327,7 +327,7 @@ void lcd_logo (bd_t * bd) int r = 8, g = 8, b = 4; int r1, g1, b1; int n; - uchar tmp[64]; /* long enough for environment variables */ + char tmp[64]; /* long enough for environment variables */ int tft = 0; immr->im_cpm.cp_pbpar &= ~(PB_LCD_PWM); @@ -453,7 +453,7 @@ void lcd_logo (bd_t * bd) } /* copy bitmap */ - fb = (char *) (fb_info.VmemAddr); + fb = (uchar *) (fb_info.VmemAddr); memcpy (fb, (uchar *) CONFIG_KUP4K_LOGO, 320 * 240); } #endif /* CONFIG_KUP4K_LOGO */ diff --git a/board/lantec/lantec.c b/board/lantec/lantec.c index aa96a16..417dbbb 100644 --- a/board/lantec/lantec.c +++ b/board/lantec/lantec.c @@ -171,7 +171,7 @@ long int initdram (int board_type) * Check Bank 0 Memory Size for re-configuration */ size_b0 = dram_size (CFG_MAMR_8COL, - (ulong *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); + (long *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); memctl->memc_mamr = CFG_MAMR_8COL | MAMR_PTAE; diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c index 7cf5778..a174b57 100644 --- a/board/lwmon/lwmon.c +++ b/board/lwmon/lwmon.c @@ -266,14 +266,14 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); + size8 = dram_size (CFG_MAMR_8COL, (long *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); udelay (1000); /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); + size9 = dram_size (CFG_MAMR_9COL, (long *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ size_b0 = size9; @@ -574,11 +574,11 @@ int misc_init_r (void) DECLARE_GLOBAL_DATA_PTR; uchar kbd_data[KEYBD_DATALEN]; - uchar keybd_env[2 * KEYBD_DATALEN + 1]; + char keybd_env[2 * KEYBD_DATALEN + 1]; uchar kbd_init_status = gd->kbd_status >> 8; uchar kbd_status = gd->kbd_status; uchar val; - uchar *str; + char *str; int i; if (kbd_init_status) { @@ -617,7 +617,7 @@ int misc_init_r (void) } setenv ("keybd", keybd_env); - str = strdup (key_match (kbd_data)); /* decode keys */ + str = strdup ((char *)key_match (kbd_data)); /* decode keys */ #ifdef KEYBD_SET_DEBUGMODE if (kbd_data[0] == KEYBD_SET_DEBUGMODE) { /* set debug mode */ if ((console_assign (stdout, "lcd") < 0) || @@ -649,11 +649,11 @@ static int compare_magic (uchar *kbd_data, uchar *str) /* Don't include modifier byte */ memcpy (compare, kbd_data+1, KEYBD_DATALEN-1); - for (; str != NULL; str = (*nxt) ? nxt+1 : nxt) { + for (; str != NULL; str = (*nxt) ? (uchar *)(nxt+1) : (uchar *)nxt) { uchar c; int k; - c = (uchar) simple_strtoul (str, (char **) (&nxt), 16); + c = (uchar) simple_strtoul ((char *)str, (char **) (&nxt), 16); if (str == (uchar *)nxt) { /* invalid character */ break; @@ -719,9 +719,9 @@ V* Verification: dzu@denx.de ***********************************************************************/ static uchar *key_match (uchar *kbd_data) { - uchar magic[sizeof (kbd_magic_prefix) + 1]; + char magic[sizeof (kbd_magic_prefix) + 1]; uchar *suffix; - uchar *kbd_magic_keys; + char *kbd_magic_keys; /* * The following string defines the characters that can pe appended @@ -737,13 +737,13 @@ static uchar *key_match (uchar *kbd_data) /* loop over all magic keys; * use '\0' suffix in case of empty string */ - for (suffix=kbd_magic_keys; *suffix || suffix==kbd_magic_keys; ++suffix) { + for (suffix=(uchar *)kbd_magic_keys; *suffix || suffix==(uchar *)kbd_magic_keys; ++suffix) { sprintf (magic, "%s%c", kbd_magic_prefix, *suffix); #if 0 printf ("### Check magic \"%s\"\n", magic); #endif - if (compare_magic(kbd_data, getenv(magic)) == 0) { - uchar cmd_name[sizeof (kbd_command_prefix) + 1]; + if (compare_magic(kbd_data, (uchar *)getenv(magic)) == 0) { + char cmd_name[sizeof (kbd_command_prefix) + 1]; char *cmd; sprintf (cmd_name, "%s%c", kbd_command_prefix, *suffix); @@ -754,7 +754,7 @@ static uchar *key_match (uchar *kbd_data) cmd_name, cmd ? cmd : "<<NULL>>"); #endif *kbd_data = *suffix; - return (cmd); + return ((uchar *)cmd); } } #if 0 @@ -863,7 +863,7 @@ V* Verification: dzu@denx.de int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { uchar kbd_data[KEYBD_DATALEN]; - uchar keybd_env[2 * KEYBD_DATALEN + 1]; + char keybd_env[2 * KEYBD_DATALEN + 1]; uchar val; int i; @@ -1044,7 +1044,7 @@ static int key_pressed(void) i2c_write (kbd_addr, 0, 0, &val, 1); i2c_read (kbd_addr, 0, 0, kbd_data, KEYBD_DATALEN); - return (compare_magic(kbd_data, CONFIG_MODEM_KEY_MAGIC) == 0); + return (compare_magic(kbd_data, (uchar *)CONFIG_MODEM_KEY_MAGIC) == 0); } #endif /* CONFIG_MODEM_SUPPORT */ @@ -1063,6 +1063,6 @@ int post_hotkeys_pressed(void) i2c_write (kbd_addr, 0, 0, &val, 1); i2c_read (kbd_addr, 0, 0, kbd_data, KEYBD_DATALEN); - return (compare_magic(kbd_data, CONFIG_POST_KEY_MAGIC) == 0); + return (compare_magic(kbd_data, (uchar *)CONFIG_POST_KEY_MAGIC) == 0); } #endif diff --git a/board/ml2/flash.c b/board/ml2/flash.c index 4f805a6..87cb1ff 100644 --- a/board/ml2/flash.c +++ b/board/ml2/flash.c @@ -216,7 +216,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) { return rc; } -volatile static int write_word (flash_info_t *info, ulong dest, unsigned long long data) { +static int write_word (flash_info_t *info, ulong dest, unsigned long long data) { volatile unsigned long long *addr=(unsigned long long *)dest; unsigned long long result; diff --git a/board/ml2/ml2.c b/board/ml2/ml2.c index ff5f816..f32e512 100644 --- a/board/ml2/ml2.c +++ b/board/ml2/ml2.c @@ -30,8 +30,8 @@ int board_early_init_f (void) int checkboard (void) { - unsigned char *s = getenv ("serial#"); - unsigned char *e; + char *s = getenv ("serial#"); + char *e; if (!s || strncmp (s, "ML2", 9)) { printf ("### No HW ID - assuming ML2"); diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c index e14bcca..b331d6e 100644 --- a/board/mpl/common/common_util.c +++ b/board/mpl/common/common_util.c @@ -163,7 +163,7 @@ mpl_prg(uchar *src, ulong size) #endif printf("flash erased, programming from 0x%lx 0x%lx Bytes\n", (ulong)src, size); - if ((rc = flash_write (src, start, size)) != 0) { + if ((rc = flash_write ((char *)src, start, size)) != 0) { puts("ERROR "); flash_perror(rc); return (1); @@ -200,14 +200,14 @@ mpl_prg_image(uchar *ld_addr) len = sizeof(image_header_t); checksum = ntohl(hdr->ih_hcrc); hdr->ih_hcrc = 0; - if (crc32 (0, (char *)data, len) != checksum) { + if (crc32 (0, (uchar *)data, len) != checksum) { puts("Bad Header Checksum\n"); return 1; } data = ld_addr + sizeof(image_header_t); len = ntohl(hdr->ih_size); puts("Verifying Checksum ... "); - if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) { + if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) { puts("Bad Data CRC\n"); return 1; } @@ -376,8 +376,8 @@ void copy_old_env(ulong size) } while(len > off); name=&name_buf[0]; value=&value_buf[0]; - if(strncmp(name,"baudrate",8)!=0) { - setenv(name,value); + if(strncmp((char *)name,"baudrate",8)!=0) { + setenv((char *)name,(char *)value); } } @@ -387,7 +387,7 @@ void copy_old_env(ulong size) void check_env(void) { - unsigned char *s; + char *s; int i=0; char buf[32]; backup_t back; @@ -592,7 +592,7 @@ void video_get_info_str (int line_number, char *info) char buf[64]; char tmp[16]; char cpustr[16]; - unsigned char *s, *e, bc; + char *s, *e, bc; switch (line_number) { case 2: diff --git a/board/mpl/common/isa.c b/board/mpl/common/isa.c index 793c34f..51b2773 100644 --- a/board/mpl/common/isa.c +++ b/board/mpl/common/isa.c @@ -155,7 +155,7 @@ void isa_write_table(SIO_LOGDEV_TABLE *ldt,unsigned char ldev) void isa_sio_loadtable(void) { - unsigned char *s = getenv("floppy"); + char *s = getenv("floppy"); /* setup Floppy device 0*/ isa_write_table((SIO_LOGDEV_TABLE *)&sio_fdc,0); /* setup parallel port device 3 */ diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c index b1adde6..84d3e1e 100644 --- a/board/mpl/mip405/mip405.c +++ b/board/mpl/mip405/mip405.c @@ -585,15 +585,15 @@ void get_pcbrev_var(unsigned char *pcbrev, unsigned char *var) int checkboard (void) { - unsigned char s[50]; + char s[50]; unsigned char bc, var; int i; backup_t *b = (backup_t *) s; puts ("Board: "); get_pcbrev_var(&bc,&var); - i = getenv_r ("serial#", s, 32); - if ((i == 0) || strncmp (s, BOARD_NAME,sizeof(BOARD_NAME))) { + i = getenv_r ("serial#", (char *)s, 32); + if ((i == 0) || strncmp ((char *)s, BOARD_NAME,sizeof(BOARD_NAME))) { get_backup_values (b); if (strncmp (b->signature, "MPL\0", 4) != 0) { puts ("### No HW ID - assuming " BOARD_NAME); @@ -728,7 +728,7 @@ int last_stage_init (void) { unsigned long stop; struct rtc_time newtm; - unsigned char *s; + char *s; mem_test_reloc(); /* write correct LED configuration */ if (miiphy_write (0x1, 0x14, 0x2402) != 0) { diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c index 590bd20..a398362 100644 --- a/board/mpl/pip405/pip405.c +++ b/board/mpl/pip405/pip405.c @@ -180,7 +180,7 @@ int board_early_init_f (void) { unsigned char dataout[1]; unsigned char datain[128]; - unsigned long sdram_size; + unsigned long sdram_size = 0; SDRAM_SETUP *t = (SDRAM_SETUP *) sdram_setup_table; unsigned long memclk; unsigned long tmemclk = 0; @@ -574,15 +574,15 @@ int board_early_init_f (void) int checkboard (void) { - unsigned char s[50]; + char s[50]; unsigned char bc; int i; backup_t *b = (backup_t *) s; puts ("Board: "); - i = getenv_r ("serial#", s, 32); - if ((i == 0) || strncmp (s, "PIP405", 6)) { + i = getenv_r ("serial#", (char *)s, 32); + if ((i == 0) || strncmp ((char *)s, "PIP405", 6)) { get_backup_values (b); if (strncmp (b->signature, "MPL\0", 4) != 0) { puts ("### No HW ID - assuming PIP405"); diff --git a/board/mvs1/mvs1.c b/board/mvs1/mvs1.c index fb7547f..f8a8cb7 100644 --- a/board/mvs1/mvs1.c +++ b/board/mvs1/mvs1.c @@ -197,14 +197,14 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); udelay (1000); /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ diff --git a/board/nx823/nx823.c b/board/nx823/nx823.c index cbcbab8..65d45c1 100644 --- a/board/nx823/nx823.c +++ b/board/nx823/nx823.c @@ -221,7 +221,7 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE1_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -229,7 +229,7 @@ long int initdram (int board_type) /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE1_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ @@ -248,7 +248,7 @@ long int initdram (int board_type) * [9 column SDRAM may also be used in 8 column mode, * but then only half the real size will be used.] */ - size_b1 = dram_size (memctl->memc_mamr, (ulong *) SDRAM_BASE2_PRELIM, + size_b1 = dram_size (memctl->memc_mamr, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); /* debug ("SDRAM Bank 1: %ld MB\n", size8 >> 20); */ diff --git a/board/o2dnt/flash.c b/board/o2dnt/flash.c index dbb49f7..037d287 100644 --- a/board/o2dnt/flash.c +++ b/board/o2dnt/flash.c @@ -154,7 +154,7 @@ void flash_print_info (flash_info_t *info) int i; uchar *boottype; uchar *bootletter; - uchar *fmt; + char *fmt; uchar botbootletter[] = "B"; uchar topbootletter[] = "T"; uchar botboottype[] = "bottom boot sector"; diff --git a/board/o2dnt/o2dnt.c b/board/o2dnt/o2dnt.c index 8c6f5db..81a2700 100644 --- a/board/o2dnt/o2dnt.c +++ b/board/o2dnt/o2dnt.c @@ -85,9 +85,9 @@ long int initdram (int board_type) /* find RAM size using SDRAM CS0 only */ sdram_start(0); - test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); sdram_start(1); - test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { sdram_start(0); dramsize = test1; @@ -113,11 +113,11 @@ long int initdram (int board_type) if (!dramsize) sdram_start(0); - test2 = test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); if (!dramsize) { sdram_start(1); - test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); } if (test1 > test2) { diff --git a/board/pcippc2/flash.c b/board/pcippc2/flash.c index 6e9e339..8c01415 100644 --- a/board/pcippc2/flash.c +++ b/board/pcippc2/flash.c @@ -136,7 +136,7 @@ static ulong flash_get_size (ulong addr, flash_info_t *info) DEBUGF("Device ID @ 0x%08lx: 0x%08x\n", addr+1, value); - switch (value) { + switch ((ulong)value) { case AMD_ID_F040B: DEBUGF("Am29F040B\n"); info->flash_id += FLASH_AM040; diff --git a/board/pm520/pm520.c b/board/pm520/pm520.c index 619df59..d4cc5cb 100644 --- a/board/pm520/pm520.c +++ b/board/pm520/pm520.c @@ -107,9 +107,9 @@ long int initdram (int board_type) /* find RAM size using SDRAM CS0 only */ sdram_start(0); - test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); sdram_start(1); - test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { sdram_start(0); dramsize = test1; @@ -135,10 +135,10 @@ long int initdram (int board_type) /* find RAM size using SDRAM CS1 only */ if (!dramsize) sdram_start(0); - test2 = test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); if (!dramsize) { sdram_start(1); - test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); } if (test1 > test2) { sdram_start(0); diff --git a/board/pn62/pn62.c b/board/pn62/pn62.c index 0252240..377aaa8 100644 --- a/board/pn62/pn62.c +++ b/board/pn62/pn62.c @@ -167,7 +167,7 @@ static int get_serial_number (char *string, int size) if (size < I2155X_VPD_SN_SIZE) size = I2155X_VPD_SN_SIZE; for (i = 0; i < (size - 1); i++) { - i2155x_read_vpd (I2155X_VPD_SN_START + i, 1, &c); + i2155x_read_vpd (I2155X_VPD_SN_START + i, 1, (uchar *)&c); if (c == '\0') break; string[i] = c; diff --git a/board/ppmc8260/ppmc8260.c b/board/ppmc8260/ppmc8260.c index e92ad8f..2b20c26 100644 --- a/board/ppmc8260/ppmc8260.c +++ b/board/ppmc8260/ppmc8260.c @@ -285,7 +285,7 @@ int misc_init_r (void) int res; if ((ds != 0) && (ds != 0xff)) { - res = getenv_r ("ethaddr", tmp, sizeof (tmp)); + res = getenv_r ("ethaddr", (char *)tmp, sizeof (tmp)); if (res > 0) { ss = ((ds >> 4) & 0x0f); ss += ss < 0x0a ? '0' : ('a' - 10); @@ -296,7 +296,7 @@ int misc_init_r (void) tmp[16] = ss; tmp[17] = '\0'; - setenv ("ethaddr", tmp); + setenv ("ethaddr", (char *)tmp); /* set the led to show the address */ *((unsigned char *) (CFG_LED_BASE + 1)) = ds; } diff --git a/board/quantum/quantum.c b/board/quantum/quantum.c index 8a73448..2861bc3 100644 --- a/board/quantum/quantum.c +++ b/board/quantum/quantum.c @@ -87,7 +87,7 @@ const uint sdram_table[] = { int checkboard (void) { - unsigned char *s = getenv ("serial#"); + char *s = getenv ("serial#"); puts ("Board QUANTUM, Serial No: "); @@ -136,7 +136,7 @@ long int initdram (int board_type) /* Check Bank 0 Memory Size, * 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); /* * Final mapping: @@ -162,7 +162,7 @@ static long int dram_size (long int mamr_value, long int *base, { volatile immap_t *immap = (immap_t *) CFG_IMMR; volatile memctl8xx_t *memctl = &immap->im_memctl; - volatile long int *addr; + volatile ulong *addr; ulong cnt, val, size; ulong save[32]; /* to make test non-destructive */ unsigned char i = 0; diff --git a/board/r360mpi/r360mpi.c b/board/r360mpi/r360mpi.c index 8ca08e2..ffb4c0e 100644 --- a/board/r360mpi/r360mpi.c +++ b/board/r360mpi/r360mpi.c @@ -152,7 +152,7 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); udelay (1000); @@ -160,7 +160,7 @@ long int initdram (int board_type) /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ @@ -287,21 +287,21 @@ static uchar *key_match (uchar *); int misc_init_r (void) { - uchar kbd_data[KEYBD_DATALEN]; - uchar keybd_env[2 * KEYBD_DATALEN + 1]; - uchar *str; + char kbd_data[KEYBD_DATALEN]; + char keybd_env[2 * KEYBD_DATALEN + 1]; + char *str; int i; i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE); - i2c_read (CFG_I2C_KEY_ADDR, 0, 0, kbd_data, KEYBD_DATALEN); + i2c_read (CFG_I2C_KEY_ADDR, 0, 0, (uchar *)kbd_data, KEYBD_DATALEN); for (i = 0; i < KEYBD_DATALEN; ++i) { sprintf (keybd_env + i + i, "%02X", kbd_data[i]); } setenv ("keybd", keybd_env); - str = strdup (key_match (keybd_env)); /* decode keys */ + str = strdup ((char *)key_match ((uchar *)keybd_env)); /* decode keys */ #ifdef CONFIG_PREBOOT /* automatically configure "preboot" command on key match */ setenv ("preboot", str); /* set or delete definition */ @@ -347,36 +347,36 @@ static uchar *key_match (uchar * kbd_str) * "key_magic" is checked (old behaviour); the string "125" causes * checks for "key_magic1", "key_magic2" and "key_magic5", etc. */ - if ((kbd_magic_keys = getenv ("magic_keys")) != NULL) { + if ((kbd_magic_keys = (uchar *)getenv ("magic_keys")) != NULL) { /* loop over all magic keys; * use '\0' suffix in case of empty string */ for (suffix = kbd_magic_keys; *suffix || suffix == kbd_magic_keys; ++suffix) { - sprintf (magic, "%s%c", kbd_magic_prefix, *suffix); + sprintf ((char *)magic, "%s%c", kbd_magic_prefix, *suffix); #if 0 printf ("### Check magic \"%s\"\n", magic); #endif - if ((str = getenv (magic)) != 0) { + if ((str = (uchar *)getenv ((char *)magic)) != 0) { #if 0 printf ("### Compare \"%s\" \"%s\"\n", kbd_str, str); #endif - if (strcmp (kbd_str, str) == 0) { - sprintf (cmd_name, "%s%c", + if (strcmp ((char *)kbd_str, (char *)str) == 0) { + sprintf ((char *)cmd_name, "%s%c", kbd_command_prefix, *suffix); - if ((cmd = getenv (cmd_name)) != 0) { + if ((cmd = getenv ((char *)cmd_name)) != 0) { #if 0 printf ("### Set PREBOOT to $(%s): \"%s\"\n", cmd_name, cmd); #endif - return (cmd); + return ((uchar *)cmd); } } } @@ -404,11 +404,11 @@ int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) puts ("Keys:"); for (i = 0; i < KEYBD_DATALEN; ++i) { - sprintf (keybd_env + i + i, "%02X", kbd_data[i]); + sprintf ((char *)(keybd_env + i + i), "%02X", kbd_data[i]); printf (" %02x", kbd_data[i]); } putc ('\n'); - setenv ("keybd", keybd_env); + setenv ("keybd", (char *)keybd_env); return 0; } diff --git a/board/rbc823/flash.c b/board/rbc823/flash.c index f12d0be..84ae5c1 100644 --- a/board/rbc823/flash.c +++ b/board/rbc823/flash.c @@ -188,12 +188,11 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) #endif switch (value) { - case 0x01: - case AMD_MANUFACT: + case 0x01: /*AMD_MANUFACT*/ info->flash_id = FLASH_MAN_AMD; break; - case FUJ_MANUFACT: + case 0x04: /*FUJ_MANUFACT*/ info->flash_id = FLASH_MAN_FUJ; break; diff --git a/board/rbc823/rbc823.c b/board/rbc823/rbc823.c index d0ceb4a..9e60c2b 100644 --- a/board/rbc823/rbc823.c +++ b/board/rbc823/rbc823.c @@ -127,7 +127,7 @@ const uint static_table[] = int checkboard (void) { - unsigned char *s = getenv ("serial#"); + char *s = getenv ("serial#"); if (!s || strncmp (s, "TQM8", 4)) { printf ("### No HW ID - assuming RBC823\n"); @@ -193,14 +193,14 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE4_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE4_PRELIM, SDRAM_MAX_SIZE); udelay (1000); /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE4_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE4_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ diff --git a/board/rmu/rmu.c b/board/rmu/rmu.c index cf00efc..8cb03c7 100644 --- a/board/rmu/rmu.c +++ b/board/rmu/rmu.c @@ -127,7 +127,7 @@ long int initdram (int board_type) * 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); /* diff --git a/board/sandburst/common/ppc440gx_i2c.c b/board/sandburst/common/ppc440gx_i2c.c index 858b38c..859dd7a 100644 --- a/board/sandburst/common/ppc440gx_i2c.c +++ b/board/sandburst/common/ppc440gx_i2c.c @@ -451,9 +451,9 @@ int i2c_write1 (uchar chip, uint addr, int alen, uchar * buffer, int len) */ uchar i2c_reg_read1(uchar i2c_addr, uchar reg) { - char buf; + uchar buf; - i2c_read1(i2c_addr, reg, 1, &buf, 1); + i2c_read1(i2c_addr, reg, 1, &buf, (uchar)1); return(buf); } diff --git a/board/sandburst/karef/karef.h b/board/sandburst/karef/karef.h index 7790819..5de7cb5 100644 --- a/board/sandburst/karef/karef.h +++ b/board/sandburst/karef/karef.h @@ -57,7 +57,7 @@ typedef struct karef_fpga_regs_s volatile unsigned long brdout_enable_ul; /* Read/Write */ volatile unsigned long brdin_data_ul; /* Read Only */ volatile unsigned long misc_ul; /* Read/Write */ -} KAREF_FPGA_REGS_ST __attribute__((packed)), * KAREF_FPGA_REGS_PST; +} __attribute__((packed)) KAREF_FPGA_REGS_ST , * KAREF_FPGA_REGS_PST; /* OFEM FPGA */ typedef struct ofem_fpga_regs_s @@ -70,7 +70,7 @@ typedef struct ofem_fpga_regs_s volatile unsigned long scrmask_ul; /* Read/Write */ volatile unsigned long control_ul; /* Read/Write */ volatile unsigned long mac_flow_ctrl_ul; /* Read/Write */ -} OFEM_FPGA_REGS_ST __attribute__((packed)), * OFEM_FPGA_REGS_PST; +} __attribute__((packed)) OFEM_FPGA_REGS_ST , * OFEM_FPGA_REGS_PST; #endif /* __KAREF_H__ */ diff --git a/board/sandburst/metrobox/metrobox.h b/board/sandburst/metrobox/metrobox.h index cb7a83c..3f28f00 100644 --- a/board/sandburst/metrobox/metrobox.h +++ b/board/sandburst/metrobox/metrobox.h @@ -40,6 +40,6 @@ typedef struct opto_fpga_regs_s { volatile unsigned long scrmask_ul; /* Read/Write */ volatile unsigned long control_ul; /* Read/Write */ volatile unsigned long boardinfo_ul; /* Read Only */ -} OPTO_FPGA_REGS_ST __attribute__ ((packed)), *OPTO_FPGA_REGS_PST; +} __attribute__ ((packed)) OPTO_FPGA_REGS_ST , *OPTO_FPGA_REGS_PST; #endif /* __METROBOX_H__ */ diff --git a/board/sbc405/sbc405.c b/board/sbc405/sbc405.c index ef9bce1..cad5873 100644 --- a/board/sbc405/sbc405.c +++ b/board/sbc405/sbc405.c @@ -78,7 +78,7 @@ int misc_init_r (void) int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/siemens/CCM/ccm.c b/board/siemens/CCM/ccm.c index 3ed1b75..5a32e45 100644 --- a/board/siemens/CCM/ccm.c +++ b/board/siemens/CCM/ccm.c @@ -102,7 +102,7 @@ int checkboard (void) unsigned char *s; unsigned char buf[64]; - s = (getenv_r ("serial#", buf, sizeof(buf)) > 0) ? buf : NULL; + s = (getenv_r ("serial#", (char *)&buf, sizeof(buf)) > 0) ? buf : NULL; puts ("Board: Siemens CCM"); @@ -203,14 +203,14 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *)SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); + size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); udelay (1000); /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *)SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); + size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); if (size8 < size9) { /* leave configuration at 9 columns */ size = size9; diff --git a/board/siemens/IAD210/IAD210.c b/board/siemens/IAD210/IAD210.c index 52cd4e6..e498937 100644 --- a/board/siemens/IAD210/IAD210.c +++ b/board/siemens/IAD210/IAD210.c @@ -155,7 +155,7 @@ long int initdram (int board_type) * Check Bank 0 Memory Size for re-configuration * */ - size = dram_size (CFG_MAMR, (ulong *) SDRAM_BASE_PRELIM, + size = dram_size (CFG_MAMR, (long *) SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE); udelay (1000); diff --git a/board/siemens/SCM/scm.c b/board/siemens/SCM/scm.c index d832edf..d20688d 100644 --- a/board/siemens/SCM/scm.c +++ b/board/siemens/SCM/scm.c @@ -206,7 +206,7 @@ const iop_conf_t iop_conf_tab[4][32] = { */ int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); diff --git a/board/siemens/common/fpga.c b/board/siemens/common/fpga.c index 169048e..e9941cd 100644 --- a/board/siemens/common/fpga.c +++ b/board/siemens/common/fpga.c @@ -169,7 +169,7 @@ static int fpga_load (fpga_t* fpga, ulong addr, int checkall) } } - if (checkall && fpga_get_version(fpga, hdr.ih_name) < 0) + if (checkall && fpga_get_version(fpga, (char *)(hdr.ih_name)) < 0) return 1; /* align length */ @@ -341,7 +341,7 @@ int fpga_init (void) } hdr = (image_header_t *)addr; - if ((new_id = fpga_get_version(fpga, hdr->ih_name)) == -1) + if ((new_id = fpga_get_version(fpga, (char *)(hdr->ih_name))) == -1) return 1; do_load = 1; diff --git a/board/siemens/pcu_e/pcu_e.c b/board/siemens/pcu_e/pcu_e.c index 6374513..3f05e4a 100644 --- a/board/siemens/pcu_e/pcu_e.c +++ b/board/siemens/pcu_e/pcu_e.c @@ -241,9 +241,9 @@ long int initdram (int board_type) * Check Bank 0 Memory Size for re-configuration */ #if PCU_E_WITH_SWAPPED_CS /* XXX */ - size_b0 = dram_size (CFG_MAMR, (ulong *) SDRAM_BASE5_PRELIM, SDRAM_MAX_SIZE); + size_b0 = dram_size (CFG_MAMR, (long *) SDRAM_BASE5_PRELIM, SDRAM_MAX_SIZE); #else /* XXX */ - size_b0 = dram_size (CFG_MAMR, (ulong *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); + size_b0 = dram_size (CFG_MAMR, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); #endif /* XXX */ memctl->memc_mamr = CFG_MAMR | MAMR_PTAE; diff --git a/board/sixnet/flash.c b/board/sixnet/flash.c index 4ab6c1b..61d7580 100644 --- a/board/sixnet/flash.c +++ b/board/sixnet/flash.c @@ -196,7 +196,7 @@ void flash_print_info (flash_info_t *info) int i; uchar *boottype; uchar *bootletter; - uchar *fmt; + char *fmt; uchar botbootletter[] = "B"; uchar topbootletter[] = "T"; uchar botboottype[] = "bottom boot sector"; diff --git a/board/sixnet/sixnet.c b/board/sixnet/sixnet.c index c31ea53..867589f 100644 --- a/board/sixnet/sixnet.c +++ b/board/sixnet/sixnet.c @@ -356,7 +356,7 @@ void nand_init(void) static long ram_size(ulong *base, long maxsize) { volatile long *test_addr; - volatile long *base_addr = base; + volatile ulong *base_addr = base; ulong ofs; /* byte offset from base_addr */ ulong save; /* to make test non-destructive */ ulong save2; /* to make test non-destructive */ diff --git a/board/snmc/qs850/qs850.c b/board/snmc/qs850/qs850.c index 105eeb8..637f125 100644 --- a/board/snmc/qs850/qs850.c +++ b/board/snmc/qs850/qs850.c @@ -89,8 +89,8 @@ const uint sdram_table[] = int checkboard (void) { - unsigned char *s, *e; - unsigned char buf[64]; + char *s, *e; + char buf[64]; int i; i = getenv_r("serial#", buf, sizeof(buf)); @@ -192,7 +192,7 @@ long int initdram (int board_type) * Check for 32M SDRAM Memory Size */ size = dram_size(CFG_32M_MAMR|MAMR_PTAE, - (ulong *)SDRAM_BASE, SDRAM_32M_MAX_SIZE); + (long *)SDRAM_BASE, SDRAM_32M_MAX_SIZE); udelay (1000); /* @@ -200,7 +200,7 @@ long int initdram (int board_type) */ if (size != SDRAM_32M_MAX_SIZE) { size = dram_size(CFG_16M_MAMR|MAMR_PTAE, - (ulong *)SDRAM_BASE, SDRAM_16M_MAX_SIZE); + (long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE); udelay (1000); } diff --git a/board/snmc/qs860t/qs860t.c b/board/snmc/qs860t/qs860t.c index 2a55157..a11d863 100644 --- a/board/snmc/qs860t/qs860t.c +++ b/board/snmc/qs860t/qs860t.c @@ -89,8 +89,8 @@ const uint sdram_table[] = int checkboard (void) { - unsigned char *s, *e; - unsigned char buf[64]; + char *s, *e; + char buf[64]; int i; i = getenv_r("serial#", buf, sizeof(buf)); @@ -163,7 +163,7 @@ long int initdram (int board_type) */ if (size != SDRAM_64M_MAX_SIZE) { #endif - size = dram_size (CFG_16M_MBMR, (ulong *)SDRAM_BASE, SDRAM_16M_MAX_SIZE); + size = dram_size (CFG_16M_MBMR, (long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE); udelay (1000); #if 0 } diff --git a/board/spd8xx/spd8xx.c b/board/spd8xx/spd8xx.c index 9f52e33..c79b9b0 100644 --- a/board/spd8xx/spd8xx.c +++ b/board/spd8xx/spd8xx.c @@ -205,7 +205,7 @@ long int initdram (int board_type) * Check Bank 0 Memory Size for re-configuration */ size_b0 = - dram_size (CFG_MBMR_8COL, (ulong *) SDRAM_BASE3_PRELIM, + dram_size (CFG_MBMR_8COL, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); memctl->memc_mbmr = CFG_MBMR_8COL | MBMR_PTBE; diff --git a/board/svm_sc8xx/svm_sc8xx.c b/board/svm_sc8xx/svm_sc8xx.c index 1311ea9..9bb9fd0 100644 --- a/board/svm_sc8xx/svm_sc8xx.c +++ b/board/svm_sc8xx/svm_sc8xx.c @@ -77,7 +77,7 @@ const uint sdram_table[] = int checkboard (void) { - unsigned char *s = getenv("serial#"); + char *s = getenv("serial#"); int board_type; if (!s || strncmp(s, "SVM8", 4)) { diff --git a/board/total5200/sdram.c b/board/total5200/sdram.c index 367c826..a1601f2 100644 --- a/board/total5200/sdram.c +++ b/board/total5200/sdram.c @@ -102,9 +102,9 @@ long int mpc5xxx_sdram_init (sdram_conf_t *sdram_conf) /* find RAM size using SDRAM CS0 only */ mpc5xxx_sdram_start(sdram_conf, 0); - test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); mpc5xxx_sdram_start(sdram_conf, 1); - test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { mpc5xxx_sdram_start(sdram_conf, 0); dramsize = test1; @@ -129,9 +129,9 @@ long int mpc5xxx_sdram_init (sdram_conf_t *sdram_conf) /* find RAM size using SDRAM CS1 only */ mpc5xxx_sdram_start(sdram_conf, 0); - test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); mpc5xxx_sdram_start(sdram_conf, 1); - test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); + test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000); if (test1 > test2) { mpc5xxx_sdram_start(sdram_conf, 0); dramsize2 = test1; @@ -199,9 +199,9 @@ long int mpc5xxx_sdram_init (sdram_conf_t *sdram_conf) /* find RAM size */ mpc5xxx_sdram_start(sdram_conf, 0); - test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); mpc5xxx_sdram_start(sdram_conf, 1); - test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000); + test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000); if (test1 > test2) { mpc5xxx_sdram_start(sdram_conf, 0); dramsize = test1; diff --git a/board/tqm5200/cmd_stk52xx.c b/board/tqm5200/cmd_stk52xx.c index c30e9df..8b9057f 100755 --- a/board/tqm5200/cmd_stk52xx.c +++ b/board/tqm5200/cmd_stk52xx.c @@ -181,7 +181,7 @@ static void i2s_init(void) static int i2s_play_wave(unsigned long addr, unsigned long len) { unsigned long i; - unsigned char *wave_file = (char *)addr + 44; /* quick'n dirty: skip + unsigned char *wave_file = (uchar *)addr + 44; /* quick'n dirty: skip * wav header*/ unsigned char swapped[4]; struct mpc5xxx_psc *psc = (struct mpc5xxx_psc*)MPC5XXX_PSC2; @@ -304,7 +304,7 @@ static int i2s_squarewave(unsigned long duration, unsigned int freq, static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { unsigned long reg, val, duration; - unsigned char *tmp; + char *tmp; unsigned int freq, channel; unsigned char volume; int rcode = 1; diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c index dbd78d5..6aad920 100644 --- a/board/tqm5200/tqm5200.c +++ b/board/tqm5200/tqm5200.c @@ -122,9 +122,9 @@ long int initdram (int board_type) /* find RAM size using SDRAM CS0 only */ sdram_start(0); - test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x20000000); + test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x20000000); sdram_start(1); - test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x20000000); + test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x20000000); if (test1 > test2) { sdram_start(0); dramsize = test1; @@ -150,9 +150,9 @@ long int initdram (int board_type) /* find RAM size using SDRAM CS1 only */ sdram_start(0); - test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x20000000); + test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000); sdram_start(1); - test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x20000000); + test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000); if (test1 > test2) { sdram_start(0); dramsize2 = test1; diff --git a/board/tqm8260/tqm8260.c b/board/tqm8260/tqm8260.c index 2291987..029863b 100644 --- a/board/tqm8260/tqm8260.c +++ b/board/tqm8260/tqm8260.c @@ -195,7 +195,7 @@ const iop_conf_t iop_conf_tab[4][32] = { */ int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); diff --git a/board/tqm8xx/load_sernum_ethaddr.c b/board/tqm8xx/load_sernum_ethaddr.c index 98baf7f..143f368 100644 --- a/board/tqm8xx/load_sernum_ethaddr.c +++ b/board/tqm8xx/load_sernum_ethaddr.c @@ -96,10 +96,10 @@ void load_sernum_ethaddr (void) /* set serial# and ethaddr if not yet defined */ if (getenv("serial#") == NULL) { - setenv ("serial#", serial); + setenv ((char *)"serial#", (char *)serial); } if (getenv("ethaddr") == NULL) { - setenv ("ethaddr", ethaddr); + setenv ((char *)"ethaddr", (char *)ethaddr); } } diff --git a/board/tqm8xx/tqm8xx.c b/board/tqm8xx/tqm8xx.c index a7a6f2a..017bdf9 100644 --- a/board/tqm8xx/tqm8xx.c +++ b/board/tqm8xx/tqm8xx.c @@ -106,7 +106,7 @@ int checkboard (void) { DECLARE_GLOBAL_DATA_PTR; - unsigned char *s = getenv ("serial#"); + char *s = getenv ("serial#"); puts ("Board: "); @@ -215,7 +215,7 @@ long int initdram (int board_type) * * try 8 column mode */ - size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM, + size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); debug ("SDRAM Bank 0 in 8 column mode: %ld MB\n", size8 >> 20); @@ -224,7 +224,7 @@ long int initdram (int board_type) /* * try 9 column mode */ - size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM, + size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE); debug ("SDRAM Bank 0 in 9 column mode: %ld MB\n", size9 >> 20); @@ -263,7 +263,7 @@ long int initdram (int board_type) * [9 column SDRAM may also be used in 8 column mode, * but then only half the real size will be used.] */ - size_b1 = dram_size (memctl->memc_mamr, (ulong *) SDRAM_BASE3_PRELIM, + size_b1 = dram_size (memctl->memc_mamr, (long int *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE); debug ("SDRAM Bank 1: %ld MB\n", size_b1 >> 20); } else { diff --git a/board/uc100/uc100.c b/board/uc100/uc100.c index 6fc68e5..1387b93 100644 --- a/board/uc100/uc100.c +++ b/board/uc100/uc100.c @@ -147,7 +147,7 @@ int board_switch(void) */ int checkboard (void) { - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); puts ("Board: "); diff --git a/board/w7o/flash.c b/board/w7o/flash.c index d6ea635..32815fb 100644 --- a/board/w7o/flash.c +++ b/board/w7o/flash.c @@ -805,7 +805,7 @@ static int _flash_protect(flash_info_t *info, long sector) int flag; ulong status; int rcode = 0; - volatile long *addr = (unsigned long *)sector; + volatile long *addr = (long *)sector; switch(info->flash_id & FLASH_TYPEMASK) { case FLASH_28F320J3A: @@ -863,7 +863,7 @@ static int _flash_unprotect(flash_info_t *info, long sector) int flag; ulong status; int rcode = 0; - volatile long *addr = (unsigned long *)sector; + volatile long *addr = (long *)sector; switch(info->flash_id & FLASH_TYPEMASK) { case FLASH_28F320J3A: diff --git a/board/w7o/fpga.c b/board/w7o/fpga.c index 336bfba..100bce4 100644 --- a/board/w7o/fpga.c +++ b/board/w7o/fpga.c @@ -252,7 +252,7 @@ int init_fpga(void) xcv_len = len - 14 - fn_len; /* fpga image length */ /* Check for uninitialized FLASH */ - if ((strncmp(buf, "w7o", 3)!=0) || (len > 0x0007ffffL) || (len == 0)) + if ((strncmp((char *)buf, "w7o", 3)!=0) || (len > 0x0007ffffL) || (len == 0)) goto bad_image; /* diff --git a/board/w7o/vpd.c b/board/w7o/vpd.c index fc2cd98..2ce1568 100644 --- a/board/w7o/vpd.c +++ b/board/w7o/vpd.c @@ -125,7 +125,7 @@ static int vpd_is_valid(unsigned dev_addr, unsigned char *buf) unsigned short stored_crc16, calc_crc16 = 0xffff; /* Check Eyecatcher */ - if (strncmp(vpd->header.eyecatcher, VPD_EYECATCHER, VPD_EYE_SIZE) != 0) { + if (strncmp((char *)(vpd->header.eyecatcher), VPD_EYECATCHER, VPD_EYE_SIZE) != 0) { unsigned offset = 0; if (dev_addr == CFG_DEF_EEPROM_ADDR) offset += SDRAM_SPD_DATA_SIZE; @@ -259,7 +259,7 @@ int vpd_get_data(unsigned char dev_addr, VPD *vpdInfo) case VPD_PID_PID: if (strlen_ok(packet, MAX_PROD_ID)) { strncpy(vpdInfo->productId, - packet->data, packet->size); + (char *)(packet->data), packet->size); } break; case VPD_PID_REV: diff --git a/board/w7o/w7o.c b/board/w7o/w7o.c index daf7f53..c56c269 100644 --- a/board/w7o/w7o.c +++ b/board/w7o/w7o.c @@ -207,8 +207,8 @@ static void w7o_env_init (VPD * vpd) (strncmp (vpd->productId, "CMM", 3) == 0))) { char buf[30]; char *eth; - unsigned char *serial = getenv ("serial#"); - unsigned char *ethaddr = getenv ("ethaddr"); + char *serial = getenv ("serial#"); + char *ethaddr = getenv ("ethaddr"); /* Set 'serial#' envvar if serial# isn't set */ if (!serial) { @@ -218,7 +218,7 @@ static void w7o_env_init (VPD * vpd) } /* Set 'ethaddr' envvar if 'ethaddr' envvar is the default */ - eth = vpd->ethAddrs[0]; + eth = (char *)(vpd->ethAddrs[0]); if (ethaddr && (strcmp (ethaddr, MK_STR (CONFIG_ETHADDR)) == 0)) { /* Now setup ethaddr */ diff --git a/board/xilinx/common/xdma_channel.c b/board/xilinx/common/xdma_channel.c index 25f1e26..3d5fc75 100644 --- a/board/xilinx/common/xdma_channel.c +++ b/board/xilinx/common/xdma_channel.c @@ -123,7 +123,7 @@ XDmaChannel_Initialize(XDmaChannel * InstancePtr, u32 BaseAddress) /* initialize the version of the component */ - XVersion_FromString(&InstancePtr->Version, "1.00a"); + XVersion_FromString(&InstancePtr->Version, (s8 *)"1.00a"); /* reset the DMA channel such that it's in a known state and ready * and indicate the initialization occured with no errors, note that diff --git a/board/xilinx/ml300/ml300.c b/board/xilinx/ml300/ml300.c index f335fc1..dad562f 100644 --- a/board/xilinx/ml300/ml300.c +++ b/board/xilinx/ml300/ml300.c @@ -55,8 +55,8 @@ board_pre_init(void) int checkboard(void) { - uchar tmp[64]; /* long enough for environment variables */ - uchar *s, *e; + char tmp[64]; /* long enough for environment variables */ + char *s, *e; int i = getenv_r("L", tmp, sizeof (tmp)); if (i < 0) { diff --git a/board/xilinx/xilinx_enet/emac_adapter.c b/board/xilinx/xilinx_enet/emac_adapter.c index bf8cf0b..1076345 100644 --- a/board/xilinx/xilinx_enet/emac_adapter.c +++ b/board/xilinx/xilinx_enet/emac_adapter.c @@ -148,7 +148,7 @@ eth_rx(void) RecvFrameLength = PKTSIZE; Result = XEmac_PollRecv(&Emac, (u8 *) etherrxbuff, &RecvFrameLength); if (Result == XST_SUCCESS) { - NetReceive(etherrxbuff, RecvFrameLength); + NetReceive((uchar)etherrxbuff, RecvFrameLength); return (1); } else { return (0); diff --git a/board/xilinx/xilinx_iic/iic_adapter.c b/board/xilinx/xilinx_iic/iic_adapter.c index 5ad4a0c..f3ecba7 100644 --- a/board/xilinx/xilinx_iic/iic_adapter.c +++ b/board/xilinx/xilinx_iic/iic_adapter.c @@ -291,15 +291,15 @@ read_crc(uchar * buffer, int len) static void ip_ml300(uchar * s, uchar * res) { - uchar temp[2]; + char temp[2]; u8 i; res[0] = 0x00; for (i = 0; i < 4; i++) { sprintf(temp, "%02x", atoi(s)); - s = strchr(s, '.') + 1; - strcat(res, temp); + s = (uchar *)strchr((char *)s, '.') + 1; + strcat((char *)res, temp); } } @@ -310,8 +310,8 @@ static void change_null(uchar * s) { if (s != NULL) { - change_null(strchr(s + 1, 255)); - *(strchr(s, 255)) = '\0'; + change_null((uchar *)strchr((char *)s + 1, 255)); + *(strchr((char *)s, 255)) = '\0'; } } @@ -321,8 +321,8 @@ change_null(uchar * s) void convert_env(void) { - uchar *s; /* pointer to env value */ - uchar temp[20]; /* temp storage for addresses */ + char *s; /* pointer to env value */ + char temp[20]; /* temp storage for addresses */ /* E -> ethaddr */ s = getenv("E"); @@ -345,8 +345,8 @@ convert_env(void) /* I -> ipaddr */ s = getenv("I"); if (s != NULL) { - sprintf(temp, "%d.%d.%d.%d", axtoi(s), axtoi(s + 2), - axtoi(s + 4), axtoi(s + 6)); + sprintf(temp, "%d.%d.%d.%d", axtoi((u8 *)s), axtoi((u8 *)(s + 2)), + axtoi((u8 *)(s + 4)), axtoi((u8 *)(s + 6))); setenv("ipaddr", temp); setenv("I", NULL); } @@ -354,8 +354,8 @@ convert_env(void) /* S -> serverip */ s = getenv("S"); if (s != NULL) { - sprintf(temp, "%d.%d.%d.%d", axtoi(s), axtoi(s + 2), - axtoi(s + 4), axtoi(s + 6)); + sprintf(temp, "%d.%d.%d.%d", axtoi((u8 *)s), axtoi((u8 *)(s + 2)), + axtoi((u8 *)(s + 4)), axtoi((u8 *)(s + 6))); setenv("serverip", temp); setenv("S", NULL); } @@ -391,9 +391,9 @@ convert_env(void) static void save_env(void) { - uchar eprom[ENV_SIZE]; /* buffer to be written back to EEPROM */ - uchar *s, temp[20]; - uchar ff[] = { 0xff, 0x00 }; /* dummy null value */ + char eprom[ENV_SIZE]; /* buffer to be written back to EEPROM */ + char *s, temp[20]; + char ff[] = { 0xff, 0x00 }; /* dummy null value */ u32 len; /* length of env to be written to EEPROM */ eprom[0] = 0x00; @@ -422,7 +422,7 @@ save_env(void) s = getenv("ipaddr"); if (s != NULL) { strcat(eprom, "I="); - ip_ml300(s, temp); + ip_ml300((uchar *)s, (uchar *)temp); strcat(eprom, temp); strcat(eprom, ff); } @@ -431,7 +431,7 @@ save_env(void) s = getenv("serverip"); if (s != NULL) { strcat(eprom, "S="); - ip_ml300(s, temp); + ip_ml300((uchar *)s, (uchar *)temp); strcat(eprom, temp); strcat(eprom, ff); } @@ -461,11 +461,11 @@ save_env(void) } len = strlen(eprom); /* find env length without crc */ - change_null(eprom); /* change 0xff to 0x00 */ + change_null((uchar *)eprom); /* change 0xff to 0x00 */ /* update EEPROM env values if there is enough space */ - if (update_crc(len, eprom) == 0) - send(CFG_ENV_OFFSET, eprom, len + 6); + if (update_crc(len, (uchar *)eprom) == 0) + send(CFG_ENV_OFFSET, (uchar *)eprom, len + 6); } /************************************************************************ |