Skip to contentSkip to conversation

Exynos: Make sure ps_hold gets set in the SPL

PATCH New Akshay Saraswat 3 participants 4 messages May 29, 2014 – Jun 3, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Exynos: Make sure ps_hold gets set in the SPL

From: Doug Anderson <[email protected]>

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.

---
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(-)
arch/arm/cpu/armv7/exynos/lowlevel_init.c +5 -1
index 11fe5b8..83e1dcf 100644
@@ -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);
arch/arm/cpu/armv7/exynos/power.c +6 -0
index 563abd7..638ee0b 100644
@@ -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())
arch/arm/include/asm/arch-exynos/power.h +1 -0
index c9609a2..a4b41ad 100644
@@ -1726,4 +1726,5 @@ uint32_t get_reset_status(void);
 
 /* Read the resume function and call it */
 void power_exit_wakeup(void);
+
 #endif
Signature · 1 line
1.7.12.4
#1 lore raw

PATCH v3 1/1 Exynos: Make sure ps_hold gets set in the SPL

Quoted 13 lines · Akshay Saraswat

From: Doug Anderson <[email protected]>

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.

---
Changes since v2:
- Removed function power_init and directly called set_ps_hold_strl.

Quoted 8 lines

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.

#2 lore raw

PATCH v3 1/1 Exynos: Make sure ps_hold gets set in the SPL

Hi Minkyu,

Quoted 17 lines · Minkyu Kang
Quoted 16 lines · Akshay Saraswat

From: Doug Anderson <[email protected]>

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.

---
Changes since v2:
- Removed function power_init and directly called set_ps_hold_strl.

Changes since v1:
- Added "Acked-by".

Quoted 7 lines
Quoted 5 lines
 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

#3 lore raw

PATCH v3 1/1 Exynos: Make sure ps_hold gets set in the SPL

Quoted 26 lines · Simon Glass

Hi Minkyu,

Quoted 23 lines · Minkyu Kang
Quoted 21 lines · Akshay Saraswat

From: Doug Anderson <[email protected]>

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.

---
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(-)
Quoted 4 lines
Quoted 1 line

applied to u-boot-samsung

Now that we have this patch we may be able to revert eb0dd99?

Indeed.
I will.

Thanks,
Minkyu Kang.