From: Lothar Waßmann Date: Mon, 2 Dec 2013 13:31:31 +0000 (+0100) Subject: karo: tx53: check for only to abort certain actions X-Git-Tag: KARO-TX-2013-12-13~26 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=03952731052446a936bfca90a3f034564d030f02 karo: tx53: check for only to abort certain actions --- diff --git a/board/karo/tx53/tx53.c b/board/karo/tx53/tx53.c index e1d495fb9d..8e4b197bfd 100644 --- a/board/karo/tx53/tx53.c +++ b/board/karo/tx53/tx53.c @@ -352,6 +352,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 PMIC setup\n"); + return 1; + } + ret = setup_pmic_voltages(); if (ret) { printf("Failed to setup PMIC voltages\n"); @@ -857,7 +862,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); @@ -1091,7 +1096,7 @@ static void tx53_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) @@ -1153,6 +1158,7 @@ int board_late_init(void) exit: tx53_init_mac(); gpio_set_value(TX53_RESET_OUT_GPIO, 1); + clear_ctrlc(); return ret; }