* [U-Boot] [PATCH v3] Exynos: Make sure ps_hold gets set in the SPL
@ 2014-05-29 16:10 Akshay Saraswat
2014-05-31 5:24 ` Minkyu Kang
0 siblings, 1 reply; 4+ messages in thread
From: Akshay Saraswat @ 2014-05-29 16:10 UTC (permalink / raw)
To: u-boot
From: Doug Anderson <dianders@chromium.org>
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>
---
Changes since v2:
- Removed function power_init and directly called set_ps_hold_strl.
Changes since v1:
- Added "Acked-by".
arch/arm/cpu/armv7/exynos/lowlevel_init.c | 6 +++++-
arch/arm/cpu/armv7/exynos/power.c | 6 ++++++
arch/arm/include/asm/arch-exynos/power.h | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv7/exynos/lowlevel_init.c b/arch/arm/cpu/armv7/exynos/lowlevel_init.c
index 11fe5b8..83e1dcf 100644
--- a/arch/arm/cpu/armv7/exynos/lowlevel_init.c
+++ b/arch/arm/cpu/armv7/exynos/lowlevel_init.c
@@ -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)
@@ -60,9 +61,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);
diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
index 563abd7..638ee0b 100644
--- a/arch/arm/cpu/armv7/exynos/power.c
+++ b/arch/arm/cpu/armv7/exynos/power.c
@@ -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())
diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
index c9609a2..a4b41ad 100644
--- a/arch/arm/include/asm/arch-exynos/power.h
+++ b/arch/arm/include/asm/arch-exynos/power.h
@@ -1726,4 +1726,5 @@ uint32_t get_reset_status(void);
/* Read the resume function and call it */
void power_exit_wakeup(void);
+
#endif
--
1.7.12.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v3] Exynos: Make sure ps_hold gets set in the SPL
2014-05-29 16:10 [U-Boot] [PATCH v3] Exynos: Make sure ps_hold gets set in the SPL Akshay Saraswat
@ 2014-05-31 5:24 ` Minkyu Kang
2014-06-02 21:18 ` Simon Glass
0 siblings, 1 reply; 4+ messages in thread
From: Minkyu Kang @ 2014-05-31 5:24 UTC (permalink / raw)
To: u-boot
On 30/05/14 01:10, Akshay Saraswat wrote:
> From: Doug Anderson <dianders@chromium.org>
>
> 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>
> ---
> Changes since v2:
> - Removed function power_init and directly called set_ps_hold_strl.
>
> Changes since v1:
> - Added "Acked-by".
>
> arch/arm/cpu/armv7/exynos/lowlevel_init.c | 6 +++++-
> arch/arm/cpu/armv7/exynos/power.c | 6 ++++++
> arch/arm/include/asm/arch-exynos/power.h | 1 +
> 3 files changed, 12 insertions(+), 1 deletion(-)
>
applied to u-boot-samsung
Thanks,
Minkyu Kang.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v3] Exynos: Make sure ps_hold gets set in the SPL
2014-05-31 5:24 ` Minkyu Kang
@ 2014-06-02 21:18 ` Simon Glass
2014-06-03 1:16 ` Minkyu Kang
0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2014-06-02 21:18 UTC (permalink / raw)
To: u-boot
Hi Minkyu,
On 30 May 2014 23:24, Minkyu Kang <mk7.kang@samsung.com> wrote:
> On 30/05/14 01:10, Akshay Saraswat wrote:
>> From: Doug Anderson <dianders@chromium.org>
>>
>> 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>
>> ---
>> Changes since v2:
>> - Removed function power_init and directly called set_ps_hold_strl.
>>
>> Changes since v1:
>> - Added "Acked-by".
>>
>> arch/arm/cpu/armv7/exynos/lowlevel_init.c | 6 +++++-
>> arch/arm/cpu/armv7/exynos/power.c | 6 ++++++
>> arch/arm/include/asm/arch-exynos/power.h | 1 +
>> 3 files changed, 12 insertions(+), 1 deletion(-)
>>
>
> applied to u-boot-samsung
Now that we have this patch we may be able to revert eb0dd99?
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v3] Exynos: Make sure ps_hold gets set in the SPL
2014-06-02 21:18 ` Simon Glass
@ 2014-06-03 1:16 ` Minkyu Kang
0 siblings, 0 replies; 4+ messages in thread
From: Minkyu Kang @ 2014-06-03 1:16 UTC (permalink / raw)
To: u-boot
On 03/06/14 06:18, Simon Glass wrote:
> Hi Minkyu,
>
> On 30 May 2014 23:24, Minkyu Kang <mk7.kang@samsung.com> wrote:
>> On 30/05/14 01:10, Akshay Saraswat wrote:
>>> From: Doug Anderson <dianders@chromium.org>
>>>
>>> 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>
>>> ---
>>> Changes since v2:
>>> - Removed function power_init and directly called set_ps_hold_strl.
>>>
>>> Changes since v1:
>>> - Added "Acked-by".
>>>
>>> arch/arm/cpu/armv7/exynos/lowlevel_init.c | 6 +++++-
>>> arch/arm/cpu/armv7/exynos/power.c | 6 ++++++
>>> arch/arm/include/asm/arch-exynos/power.h | 1 +
>>> 3 files changed, 12 insertions(+), 1 deletion(-)
>>>
>>
>> applied to u-boot-samsung
>
> Now that we have this patch we may be able to revert eb0dd99?
>
Indeed.
I will.
Thanks,
Minkyu Kang.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-03 1:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29 16:10 [U-Boot] [PATCH v3] Exynos: Make sure ps_hold gets set in the SPL Akshay Saraswat
2014-05-31 5:24 ` Minkyu Kang
2014-06-02 21:18 ` Simon Glass
2014-06-03 1:16 ` Minkyu Kang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox