From 3e9a299231c9967e88e28937a8b202fc1a167ec7 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Fri, 16 Jun 2006 15:47:05 +0200 Subject: Fix udelay bug in vfd.c for trab board Patch by Martin Krause, 27 Oct 2005 --- board/trab/vfd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'board/trab') diff --git a/board/trab/vfd.c b/board/trab/vfd.c index cea8b0b..2f1e7d7 100644 --- a/board/trab/vfd.c +++ b/board/trab/vfd.c @@ -358,6 +358,8 @@ void transfer_pic(int display, unsigned char *adr, int height, int width) */ int vfd_init_clocks (void) { + int i; + S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); S3C24X0_TIMERS * const timers = S3C24X0_GetBase_TIMERS(); S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); @@ -367,7 +369,9 @@ int vfd_init_clocks (void) */ gpio->PCUP = (gpio->PCUP & 0xFFF0); /* activate GPC0...GPC3 pullups */ gpio->PCCON = (gpio->PCCON & 0xFFFFFF00); /* configure GPC0...GPC3 as inputs */ - udelay (10); /* allow signals to settle */ + /* allow signals to settle */ + for (i=0; i<10000; i++) /* udelay isn't working yet at this point! */ + __asm("NOP"); vfd_board_id = (~gpio->PCDAT) & 0x000F; /* read GPC0...GPC3 port pins */ VFD_DISABLE; /* activate blank for the vfd */ -- cgit v1.1 From b9fff8ee83170da1160e0665c7027e6744823d49 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Fri, 16 Jun 2006 15:52:58 +0200 Subject: Fix wrong usage of udelay() in led_blink() on trab board Patch by Martin Krause, 27 Oct 2005 --- board/trab/cmd_trab.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board/trab') diff --git a/board/trab/cmd_trab.c b/board/trab/cmd_trab.c index 00eb385..edea8f0 100644 --- a/board/trab/cmd_trab.c +++ b/board/trab/cmd_trab.c @@ -729,6 +729,7 @@ static void led_blink (void) /* blink LED. This function does not return! */ while (1) { + reset_timer_masked (); led_set (1); udelay (1000000 / LED_BLINK_FREQ / 2); led_set (0); -- cgit v1.1 From 4bdb53cafb5cdfb13c3a1fc7a133ca36d1d5e00d Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Fri, 16 Jun 2006 15:56:12 +0200 Subject: Fix setting of environment variable "ver" on trab board The environment variable "ver" is now set before do_auto_update() is called, so that "ver" can be used in USB update scripts. Patch by Martin Krause, 27 Oct 2005 --- board/trab/trab.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'board/trab') diff --git a/board/trab/trab.c b/board/trab/trab.c index 868a899..346406e 100644 --- a/board/trab/trab.c +++ b/board/trab/trab.c @@ -161,6 +161,19 @@ int misc_init_r (void) uchar *str; int i; +#ifdef CONFIG_VERSION_VARIABLE + { + /* Set version variable. Please note, that this variable is + * also set in main_loop() later in the boot process. The + * version variable has to be set this early, because so it + * could be used in script files on an usb stick, which + * might be called during do_auto_update() */ + extern char version_string[]; + + setenv ("ver", version_string); + } +#endif /* CONFIG_VERSION_VARIABLE */ + #ifdef CONFIG_AUTO_UPDATE extern int do_auto_update(void); /* this has priority over all else */ -- cgit v1.1 From cebd1fcec0f7a484ca7e8ecce76c6d9c211368ec Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Fri, 16 Jun 2006 16:14:28 +0200 Subject: Fix TRAB channel switching delay for trab_fkt.bin standalone applikation Patch by Martin Krause, 08 Nov 2005 In tsc2000_read_channel() the delay after setting the multiplexer to a temperature channel is increased from 1,5 ms to 10 ms. This is to allow the multiplexer inputs to stabilize after huge steps of the input signal level. --- board/trab/tsc2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/trab') diff --git a/board/trab/tsc2000.c b/board/trab/tsc2000.c index ca68682..382a85b 100644 --- a/board/trab/tsc2000.c +++ b/board/trab/tsc2000.c @@ -223,7 +223,7 @@ u16 tsc2000_read_channel (unsigned int channel) u16 res; tsc2000_set_mux(channel); - udelay(3 * TSC2000_DELAY_BASE); + udelay(20 * TSC2000_DELAY_BASE); tsc2000_write(TSC2000_REG_ADC, 0x2036); adc_wait_conversion_done (); -- cgit v1.1 From a63c31cff5147f1eca19d884ee120005775fbffc Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 26 Jun 2006 10:54:52 +0200 Subject: Cleanup trab board for GCC-4.x --- board/trab/auto_update.c | 9 +++++---- board/trab/cmd_trab.c | 16 ++++++++-------- board/trab/memory.c | 8 ++++---- board/trab/trab.c | 22 +++++++++++----------- board/trab/trab_fkt.c | 24 ++++++++++++------------ 5 files changed, 40 insertions(+), 39 deletions(-) (limited to 'board/trab') 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); -- cgit v1.1 From 0de7fa59391fa529bec4ef11647f063f67fd9786 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 19 Jul 2006 14:07:21 +0200 Subject: Add additional error messages to flash driver on TRAB board (for erase errors and timeout errors) Patch by Martin Krause, 14 Feb 2006 --- board/trab/flash.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'board/trab') diff --git a/board/trab/flash.c b/board/trab/flash.c index 8cdd824..77a6fc2 100644 --- a/board/trab/flash.c +++ b/board/trab/flash.c @@ -281,10 +281,12 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) if (chip1 == ERR || chip2 == ERR) { rc = ERR_PROG_ERROR; + printf ("Flash erase error\n"); goto outahere; } if (chip1 == TMO) { rc = ERR_TIMOUT; + printf ("Flash erase timeout error\n"); goto outahere; } } @@ -384,8 +386,13 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) *addr = CMD_READ_ARRAY; - if (chip1 == ERR || chip2 == ERR || *addr != data) + if (chip1 == ERR || chip2 == ERR || *addr != data) { rc = ERR_PROG_ERROR; + printf ("Flash program error\n"); + debug ("chip1: %#x, chip2: %#x, addr: %#lx *addr: %#lx, " + "data: %#lx\n", + chip1, chip2, addr, *addr, data); + } if (iflag) enable_interrupts (); -- cgit v1.1 From 5a3dfef73240cd6b5044184e521351afdb20838f Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 19 Jul 2006 14:13:02 +0200 Subject: Fix some bugs in TRAB board flash driver. - increase CFG_FLASH_ERASE_TOUT from 2 to 15 seconds - use CFG_FLASH_WRITE_TOUT for programming instead of CFG_FLASH_ERASE_TOUT - remove "Unlock Bypass" mode, because macronix flashes do not support this mode officially - fix flash reset command from 0x00FF to 0x00F0. 0x00FF is only specified for Intel compatible flashes, not for AMD compatible. Patch by Martin Krause, 15 Feb 2006 --- board/trab/flash.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'board/trab') diff --git a/board/trab/flash.c b/board/trab/flash.c index 77a6fc2..3e8f105 100644 --- a/board/trab/flash.c +++ b/board/trab/flash.c @@ -342,7 +342,9 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) #endif iflag = disable_interrupts (); - *addr = CMD_PROGRAM; + MEM_FLASH_ADDR1 = CMD_UNLOCK1; + MEM_FLASH_ADDR2 = CMD_UNLOCK2; + MEM_FLASH_ADDR1 = CMD_PROGRAM; *addr = data; /* arm simple, non interrupt dependent timer */ @@ -354,7 +356,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) result = *addr; /* check timeout */ - if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { + if (get_timer_masked () > CFG_FLASH_WRITE_TOUT) { chip1 = ERR | TMO; break; } @@ -415,10 +417,6 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) int l; int i, rc; - MEM_FLASH_ADDR1 = CMD_UNLOCK1; - MEM_FLASH_ADDR2 = CMD_UNLOCK2; - MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; - wp = (addr & ~3); /* get lower word aligned address */ /* @@ -486,9 +484,6 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) Done: - MEM_FLASH_ADDR = CMD_UNLOCK_BYPASS_RES1; - MEM_FLASH_ADDR = CMD_UNLOCK_BYPASS_RES2; - return (rc); } @@ -522,7 +517,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) info->flash_id = FLASH_UNKNOWN; info->sector_count = 0; info->size = 0; - addr[0] = 0x00FF00FF; /* restore read mode */ + addr[0] = CMD_READ_ARRAY; /* restore read mode */ debug ("## flash_init: unknown manufacturer\n"); return (0); /* no or unknown flash */ } @@ -537,7 +532,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) info->sector_count = 71; info->size = 0x00800000; - addr[0] = 0x00FF00FF; /* restore read mode */ + addr[0] = CMD_READ_ARRAY; /* restore read mode */ break; /* => 8 MB */ case AMD_ID_LV640U: @@ -545,7 +540,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) info->sector_count = 128; info->size = 0x01000000; - addr[0] = 0x00F000F0; /* restore read mode */ + addr[0] = CMD_READ_ARRAY; /* restore read mode */ break; /* => 16 MB */ case MX_ID_LV320B: @@ -553,13 +548,13 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info) info->sector_count = 71; info->size = 0x00800000; - addr[0] = 0x00FF00FF; /* restore read mode */ + addr[0] = CMD_READ_ARRAY; /* restore read mode */ break; /* => 8 MB */ default: debug ("## flash_init: unknown flash chip\n"); info->flash_id = FLASH_UNKNOWN; - addr[0] = 0x00FF00FF; /* restore read mode */ + addr[0] = CMD_READ_ARRAY; /* restore read mode */ return (0); /* => no or unknown flash */ } -- cgit v1.1 From d053ce62cd7cc7cefc24cfba9ffa49124a3ff4f8 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 19 Jul 2006 14:23:12 +0200 Subject: Bugfix in VFD routine on TRAB board. Make sure upper lext pixel can be set to blue, too (so far only red was possible). Patch by Martin Krause, 15 Feb 2006 --- board/trab/vfd.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'board/trab') diff --git a/board/trab/vfd.c b/board/trab/vfd.c index 2f1e7d7..b6798fd 100644 --- a/board/trab/vfd.c +++ b/board/trab/vfd.c @@ -251,19 +251,17 @@ void create_vfd_table(void) unsigned long adr = gd->fb_base; unsigned int bit_nr = 0; - if (vfd_table[x][y][color][display][entry]) { - - pixel = vfd_table[x][y][color][display][entry] + frame_buf_offs; - /* - * wrap arround if offset - * (see manual S3C2400) - */ - if (pixel>=FRAME_BUF_SIZE*8) - pixel = pixel-(FRAME_BUF_SIZE*8); - adr = gd->fb_base+(pixel/32)*4+(3-(pixel%32)/8); - bit_nr = pixel%8; - bit_nr = (bit_nr>3)?bit_nr-4:bit_nr+4; - } + pixel = vfd_table[x][y][color][display][entry] + frame_buf_offs; + /* + * wrap arround if offset + * (see manual S3C2400) + */ + if (pixel>=FRAME_BUF_SIZE*8) + pixel = pixel-(FRAME_BUF_SIZE*8); + adr = gd->fb_base+(pixel/32)*4+(3-(pixel%32)/8); + bit_nr = pixel%8; + bit_nr = (bit_nr>3)?bit_nr-4:bit_nr+4; + adr_vfd_table[x][y][color][display][entry] = adr; bit_vfd_table[x][y][color][display][entry] = bit_nr; } -- cgit v1.1 From c786f427f9cbccb64a28020e28458895e39df43a Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 19 Jul 2006 14:40:43 +0200 Subject: Adjust filenames for USB update images on TRAB board. During an automatic update via USB stick, U-Boot searches for images with the name "firmware.img" and "kernel.img". This names are now changed to "firmw_01.img" and "kernl_01.img". This is done, to prevent updates of new boards (with the new macronics "c" step flashes) with old, incompatible firmware or kernel versions. Patch by Martin Krause, 21 Jun 2006 --- board/trab/auto_update.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'board/trab') diff --git a/board/trab/auto_update.c b/board/trab/auto_update.c index 442c555..d2c8d44 100644 --- a/board/trab/auto_update.c +++ b/board/trab/auto_update.c @@ -57,9 +57,9 @@ * valid then run it. * 2) if preinst.img is found load it into memory. If it is * valid then run it. Update the EEPROM. - * 3) if firmware.img is found load it into memory. If it is valid, + * 3) if firmw_01.img is found load it into memory. If it is valid, * burn it into FLASH and update the EEPROM. - * 4) if kernel.img is found load it into memory. If it is valid, + * 4) if kernl_01.img is found load it into memory. If it is valid, * burn it into FLASH and update the EEPROM. * 5) if app.img is found load it into memory. If it is valid, * burn it into FLASH and update the EEPROM. @@ -81,8 +81,8 @@ /* possible names of files on the USB stick. */ #define AU_PREPARE "prepare.img" #define AU_PREINST "preinst.img" -#define AU_FIRMWARE "firmware.img" -#define AU_KERNEL "kernel.img" +#define AU_FIRMWARE "firmw_01.img" +#define AU_KERNEL "kernl_01.img" #define AU_APP "app.img" #define AU_DISK "disk.img" #define AU_POSTINST "postinst.img" -- cgit v1.1