summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/trab/auto_update.c9
-rw-r--r--board/trab/cmd_trab.c16
-rw-r--r--board/trab/memory.c8
-rw-r--r--board/trab/trab.c22
-rw-r--r--board/trab/trab_fkt.c24
5 files changed, 40 insertions, 39 deletions
diff --git a/board/trab/auto_update.c b/board/trab/auto_update.c
index 056e562..442c555 100644
--- a/board/trab/auto_update.c
+++ b/board/trab/auto_update.c
@@ -222,7 +222,7 @@ au_check_cksum_valid(int idx, 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", aufile[idx]);
@@ -261,7 +261,7 @@ au_check_header_valid(int idx, 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", aufile[idx]);
return -1;
}
@@ -397,7 +397,7 @@ au_do_update(int idx, long sz)
}
/* check the dcrc of the copy */
- if (crc32 (0, (char *)(start + off), ntohl(hdr->ih_size)) != ntohl(hdr->ih_dcrc)) {
+ if (crc32 (0, (uchar *)(start + off), ntohl(hdr->ih_size)) != ntohl(hdr->ih_dcrc)) {
printf ("Image %s Bad Data Checksum After COPY\n", aufile[idx]);
return -1;
}
@@ -613,7 +613,8 @@ do_auto_update(void)
#define VFD_LOGO_WIDTH 112
#define VFD_LOGO_HEIGHT 72
/* must call transfer_pic directly */
- transfer_pic(3, env, VFD_LOGO_HEIGHT, VFD_LOGO_WIDTH);
+ transfer_pic(3, (unsigned char *)env,
+ VFD_LOGO_HEIGHT, VFD_LOGO_WIDTH);
}
bitmap_first = 1;
}
diff --git a/board/trab/cmd_trab.c b/board/trab/cmd_trab.c
index edea8f0..b82c8ed 100644
--- a/board/trab/cmd_trab.c
+++ b/board/trab/cmd_trab.c
@@ -147,11 +147,11 @@ u8 status;
u16 pass_cycles;
u16 first_error_cycle;
u8 first_error_num;
-unsigned char first_error_name[16];
+char first_error_name[16];
u16 act_cycle;
typedef struct test_function_s {
- unsigned char *name;
+ char *name;
int (*pf)(void);
} test_function_t;
@@ -376,7 +376,7 @@ int do_burn_in_status (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return (1);
}
if (i2c_read_multiple (I2C_EEPROM_DEV_ADDR, EE_ADDR_FIRST_ERROR_NAME,
- 1, first_error_name,
+ 1, (unsigned char*)first_error_name,
sizeof (first_error_name))) {
return (1);
}
@@ -537,7 +537,7 @@ static int test_eeprom (void)
/* write test string 1, read back and verify */
if (i2c_write_multiple (I2C_EEPROM_DEV_ADDR, EE_ADDR_TEST, 1,
- EEPROM_TEST_STRING_1,
+ (unsigned char*)EEPROM_TEST_STRING_1,
sizeof (EEPROM_TEST_STRING_1))) {
return (1);
}
@@ -547,7 +547,7 @@ static int test_eeprom (void)
return (1);
}
- if (strcmp (temp, EEPROM_TEST_STRING_1) != 0) {
+ if (strcmp ((char *)temp, EEPROM_TEST_STRING_1) != 0) {
result = 1;
printf ("%s: error; read_str = \"%s\"\n", __FUNCTION__, temp);
}
@@ -555,7 +555,7 @@ static int test_eeprom (void)
/* write test string 2, read back and verify */
if (result == 0) {
if (i2c_write_multiple (I2C_EEPROM_DEV_ADDR, EE_ADDR_TEST, 1,
- EEPROM_TEST_STRING_2,
+ (unsigned char*)EEPROM_TEST_STRING_2,
sizeof (EEPROM_TEST_STRING_2))) {
return (1);
}
@@ -565,7 +565,7 @@ static int test_eeprom (void)
return (1);
}
- if (strcmp (temp, EEPROM_TEST_STRING_2) != 0) {
+ if (strcmp ((char *)temp, EEPROM_TEST_STRING_2) != 0) {
result = 1;
printf ("%s: error; read str = \"%s\"\n",
__FUNCTION__, temp);
@@ -777,7 +777,7 @@ static int global_vars_write_to_eeprom (void)
return (1);
}
if (i2c_write_multiple (I2C_EEPROM_DEV_ADDR, EE_ADDR_FIRST_ERROR_NAME,
- 1, first_error_name,
+ 1, (unsigned char*) first_error_name,
sizeof(first_error_name))) {
return (1);
}
diff --git a/board/trab/memory.c b/board/trab/memory.c
index 4097892..58bd995 100644
--- a/board/trab/memory.c
+++ b/board/trab/memory.c
@@ -419,14 +419,14 @@ int memory_post_tests (unsigned long start, unsigned long size)
int ret = 0;
if (ret == 0)
- ret = memory_post_dataline ((long long *)start);
+ ret = memory_post_dataline ((unsigned long long *)start);
WATCHDOG_RESET ();
if (ret == 0)
- ret = memory_post_addrline ((long *)start, (long *)start, size);
+ ret = memory_post_addrline ((ulong *)start, (ulong *)start, size);
WATCHDOG_RESET ();
if (ret == 0)
- ret = memory_post_addrline ((long *)(start + size - 8),
- (long *)start, size);
+ ret = memory_post_addrline ((ulong *)(start + size - 8),
+ (ulong *)start, size);
WATCHDOG_RESET ();
if (ret == 0)
ret = memory_post_test1 (start, size, 0x00000000);
diff --git a/board/trab/trab.c b/board/trab/trab.c
index 346406e..26e52d2 100644
--- a/board/trab/trab.c
+++ b/board/trab/trab.c
@@ -152,13 +152,13 @@ int dram_init (void)
#define KBD_DATA (((*(volatile ulong *)0x04020000) >> 16) & 0xF)
-static uchar *key_match (ulong);
+static char *key_match (ulong);
int misc_init_r (void)
{
ulong kbd_data = KBD_DATA;
- uchar keybd_env[KEYBD_KEY_NUM + 1];
- uchar *str;
+ char *str;
+ char keybd_env[KEYBD_KEY_NUM + 1];
int i;
#ifdef CONFIG_VERSION_VARIABLE
@@ -208,7 +208,7 @@ int misc_init_r (void)
static uchar kbd_magic_prefix[] = "key_magic";
static uchar kbd_command_prefix[] = "key_cmd";
-static int compare_magic (ulong kbd_data, uchar *str)
+static int compare_magic (ulong kbd_data, char *str)
{
uchar key_mask;
@@ -254,12 +254,12 @@ static int compare_magic (ulong kbd_data, uchar *str)
* Note: the string points to static environment data and must be
* saved before you call any function that modifies the environment.
*/
-static uchar *key_match (ulong kbd_data)
+static char *key_match (ulong kbd_data)
{
- uchar magic[sizeof (kbd_magic_prefix) + 1];
- uchar cmd_name[sizeof (kbd_command_prefix) + 1];
- uchar *suffix;
- uchar *kbd_magic_keys;
+ char magic[sizeof (kbd_magic_prefix) + 1];
+ char cmd_name[sizeof (kbd_command_prefix) + 1];
+ char *suffix;
+ char *kbd_magic_keys;
/*
* The following string defines the characters that can pe appended
@@ -304,7 +304,7 @@ static uchar *key_match (ulong kbd_data)
int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
ulong kbd_data = KBD_DATA;
- uchar keybd_env[KEYBD_KEY_NUM + 1];
+ char keybd_env[KEYBD_KEY_NUM + 1];
int i;
puts ("Keys:");
@@ -404,7 +404,7 @@ static void tsc2000_write(unsigned int page, unsigned int reg,
static void tsc2000_set_brightness(void)
{
- uchar tmp[10];
+ char tmp[10];
int i, br;
spi_init();
diff --git a/board/trab/trab_fkt.c b/board/trab/trab_fkt.c
index abb3b29..71be6e0 100644
--- a/board/trab/trab_fkt.c
+++ b/board/trab/trab_fkt.c
@@ -967,21 +967,21 @@ static int touch_write_clibration_values (int calib_point, int x, int y)
if (calib_point == CALIB_TL) {
if (i2c_write_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_X0, 1,
- (char *)&x, 2)) {
+ (unsigned char *)&x, 2)) {
return 1;
}
if (i2c_write_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_Y0, 1,
- (char *)&y, 2)) {
+ (unsigned char *)&y, 2)) {
return 1;
}
/* verify written values */
if (i2c_read_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_X0, 1,
- (char *)&x_verify, 2)) {
+ (unsigned char *)&x_verify, 2)) {
return 1;
}
if (i2c_read_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_Y0, 1,
- (char *)&y_verify, 2)) {
+ (unsigned char *)&y_verify, 2)) {
return 1;
}
if ((y != y_verify) || (x != x_verify)) {
@@ -993,21 +993,21 @@ static int touch_write_clibration_values (int calib_point, int x, int y)
}
else if (calib_point == CALIB_DR) {
if (i2c_write_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_X1, 1,
- (char *)&x, 2)) {
+ (unsigned char *)&x, 2)) {
return 1;
}
if (i2c_write_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_Y1, 1,
- (char *)&y, 2)) {
+ (unsigned char *)&y, 2)) {
return 1;
}
/* verify written values */
if (i2c_read_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_X1, 1,
- (char *)&x_verify, 2)) {
+ (unsigned char *)&x_verify, 2)) {
return 1;
}
if (i2c_read_multiple (I2C_EEPROM_DEV_ADDR, TOUCH_Y1, 1,
- (char *)&y_verify, 2)) {
+ (unsigned char *)&y_verify, 2)) {
return 1;
}
if ((y != y_verify) || (x != x_verify)) {
@@ -1110,7 +1110,7 @@ int do_serial_number (char **argv)
if (strcmp (argv[2], "read") == 0) {
if (i2c_read (I2C_EEPROM_DEV_ADDR, SERIAL_NUMBER, 1,
- (char *)&serial_number, 4)) {
+ (unsigned char *)&serial_number, 4)) {
printf ("could not read from eeprom\n");
return (1);
}
@@ -1121,7 +1121,7 @@ int do_serial_number (char **argv)
else if (strcmp (argv[2], "write") == 0) {
serial_number = simple_strtoul(argv[3], NULL, 10);
if (i2c_write (I2C_EEPROM_DEV_ADDR, SERIAL_NUMBER, 1,
- (char *)&serial_number, 4)) {
+ (unsigned char *)&serial_number, 4)) {
printf ("could not write to eeprom\n");
return (1);
}
@@ -1141,7 +1141,7 @@ int do_crc16 (void)
{
#if (CONFIG_COMMANDS & CFG_CMD_I2C)
int crc;
- char buf[EEPROM_MAX_CRC_BUF];
+ unsigned char buf[EEPROM_MAX_CRC_BUF];
if (i2c_read (I2C_EEPROM_DEV_ADDR, 0, 1, buf, 60)) {
printf ("could not read from eeprom\n");
@@ -1153,7 +1153,7 @@ int do_crc16 (void)
print_identifier ();
printf ("crc16=%#04x\n", crc);
- if (i2c_write (I2C_EEPROM_DEV_ADDR, CRC16, 1, (char *)&crc,
+ if (i2c_write (I2C_EEPROM_DEV_ADDR, CRC16, 1, (unsigned char *)&crc,
sizeof (crc))) {
printf ("could not read from eeprom\n");
return (1);