From: Lothar Waßmann Date: Tue, 18 Feb 2014 13:33:53 +0000 (+0100) Subject: karo: tx51: use had_ctrlc() instead of tstc() to decide whether to load init LCD... X-Git-Tag: KARO-TX6-2014-03-07~13^2~5 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=da19bfd2dc72ec544504bc3e55c9716abad86ca9 karo: tx51: use had_ctrlc() instead of tstc() to decide whether to load init LCD and set cpu clock --- diff --git a/board/karo/tx51/tx51.c b/board/karo/tx51/tx51.c index df5773b853..502487523b 100644 --- a/board/karo/tx51/tx51.c +++ b/board/karo/tx51/tx51.c @@ -269,6 +269,11 @@ int board_init(void) { /* Address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x1000; + + if (ctrlc() || (wrsr & WRSR_TOUT)) { + printf("CTRL-C detected; Skipping boot critical setup\n"); + return 1; + } return 0; } @@ -786,7 +791,7 @@ void lcd_ctrl_init(void *lcdbase) return; } - if (tstc() || (wrsr & WRSR_TOUT)) { + if (had_ctrlc() || (wrsr & WRSR_TOUT)) { debug("Disabling LCD\n"); lcd_enabled = 0; setenv("splashimage", NULL); @@ -998,7 +1003,7 @@ static void tx51_set_cpu_clock(void) unsigned long cpu_clk = getenv_ulong("cpu_clk", 10, 0); int ret; - if (tstc() || (wrsr & WRSR_TOUT)) + if (had_ctrlc() || (wrsr & WRSR_TOUT)) return; if (cpu_clk == 0 || cpu_clk == mxc_get_clock(MXC_ARM_CLK) / 1000000) @@ -1061,7 +1066,9 @@ int board_late_init(void) exit: tx51_init_mac(); + gpio_set_value(TX51_RESET_OUT_GPIO, 1); + clear_ctrlc(); return ret; }