]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
karo: tx51: use had_ctrlc() instead of tstc() to decide whether to load init LCD...
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 18 Feb 2014 13:33:53 +0000 (14:33 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 18 Feb 2014 13:33:53 +0000 (14:33 +0100)
board/karo/tx51/tx51.c

index df5773b853cbb834a289525df6615d6f2d45e0ff..502487523bffc4c1d299c50b2bd56aa36d22be55 100644 (file)
@@ -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;
 }