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