]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Exynos: Make sure ps_hold gets set in the SPL
authorDoug Anderson <dianders@chromium.org>
Thu, 29 May 2014 16:10:54 +0000 (21:40 +0530)
committerMinkyu Kang <mk7.kang@samsung.com>
Sat, 31 May 2014 05:22:20 +0000 (14:22 +0900)
Setting ps_hold ought to be one of the first things we do when we
first boot up. If we wait until the main u-boot runs we won't set it
in time and the PMIC may power us back off.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/cpu/armv7/exynos/lowlevel_init.c
arch/arm/cpu/armv7/exynos/power.c
arch/arm/include/asm/arch-exynos/power.h

index 48b5511c42997af54598413bd49f878a22f45c45..dcc270ffe4bdcc3e43fa3a35492eaeeaaf0d5266 100644 (file)
@@ -39,6 +39,7 @@ enum {
        DO_CLOCKS       = 1 << 1,
        DO_MEM_RESET    = 1 << 2,
        DO_UART         = 1 << 3,
+       DO_POWER        = 1 << 4,
 };
 
 int do_lowlevel_init(void)
@@ -62,9 +63,12 @@ int do_lowlevel_init(void)
                break;
        default:
                /* This is a normal boot (not a wake from sleep) */
-               actions = DO_CLOCKS | DO_MEM_RESET;
+               actions = DO_CLOCKS | DO_MEM_RESET | DO_POWER;
        }
 
+       if (actions & DO_POWER)
+               set_ps_hold_ctrl();
+
        if (actions & DO_CLOCKS) {
                system_clock_init();
                mem_ctrl_init(actions & DO_MEM_RESET);
index 563abd750f5bfec9725395577e4f7b0c3fe6bfca..638ee0b30b5d5e87b742ed86648966a497cd81e0 100644 (file)
@@ -112,6 +112,12 @@ static void exynos5_set_ps_hold_ctrl(void)
                        EXYNOS_PS_HOLD_CONTROL_DATA_HIGH);
 }
 
+/*
+ * Set ps_hold data driving value high
+ * This enables the machine to stay powered on
+ * after the initial power-on condition goes away
+ * (e.g. power button).
+ */
 void set_ps_hold_ctrl(void)
 {
        if (cpu_is_exynos5())
index c9609a23f5244ed75cd8e0ca566b0301841b8503..a4b41adca9b4f3364d73e10a097795edcacd4224 100644 (file)
@@ -1726,4 +1726,5 @@ uint32_t get_reset_status(void);
 
 /* Read the resume function and call it */
 void power_exit_wakeup(void);
+
 #endif