Patchwork [U-Boot,1/2,V2] EXYNOS5: Add function to setup set ps hold

login
register
mail settings
Submitter Rajeshwari Birje
Date Jan. 23, 2013, 10:07 a.m.
Message ID <1358935677-10876-2-git-send-email-rajeshwari.s@samsung.com>
Download mbox | patch
Permalink /patch/214868/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Rajeshwari Birje - Jan. 23, 2013, 10:07 a.m.
This patch adds a function to 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).

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
Changes in V2:
	- Corrected the multi line comment style
 arch/arm/cpu/armv7/exynos/power.c        |   10 ++++++++++
 arch/arm/include/asm/arch-exynos/power.h |    9 +++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)
Minkyu Kang - Feb. 13, 2013, 5:46 a.m.
Dear Rajeshwari,

On 23/01/13 19:07, Rajeshwari Shinde wrote:
> This patch adds a function to 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).
> 
> Acked-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
> Changes in V2:
> 	- Corrected the multi line comment style
>  arch/arm/cpu/armv7/exynos/power.c        |   10 ++++++++++
>  arch/arm/include/asm/arch-exynos/power.h |    9 +++++++++
>  2 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
> index d4bce6d..8572cfd 100644
> --- a/arch/arm/cpu/armv7/exynos/power.c
> +++ b/arch/arm/cpu/armv7/exynos/power.c
> @@ -95,3 +95,13 @@ void set_dp_phy_ctrl(unsigned int enable)
>  	if (cpu_is_exynos5())
>  		exynos5_dp_phy_control(enable);
>  }
> +
> +void power_ps_hold_setup(void)

Could you please modify function's name as other functions?
(e.g: set_*)

> +{
> +	struct exynos5_power *power =
> +		(struct exynos5_power *)samsung_get_base_power();
> +
> +	/* Set PS-Hold high */
> +	setbits_le32(&power->ps_hold_control,
> +			EXYNOS_PS_HOLD_CONTROL_DATA_HIGH);
> +}

This function should support exynos4 also.
Please refer other functions.
 
> diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
> index d2fdb59..8384cbb 100644
> --- a/arch/arm/include/asm/arch-exynos/power.h
> +++ b/arch/arm/include/asm/arch-exynos/power.h
> @@ -864,4 +864,13 @@ void set_dp_phy_ctrl(unsigned int enable);
>  
>  #define EXYNOS_DP_PHY_ENABLE		(1 << 0)
>  
> +#define EXYNOS_PS_HOLD_CONTROL_DATA_HIGH	(1 << 8)
> +
> +/*
> + * 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 power_ps_hold_setup(void);
>  #endif
> 

Thanks.
Minkyu Kang.

Patch

diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
index d4bce6d..8572cfd 100644
--- a/arch/arm/cpu/armv7/exynos/power.c
+++ b/arch/arm/cpu/armv7/exynos/power.c
@@ -95,3 +95,13 @@  void set_dp_phy_ctrl(unsigned int enable)
 	if (cpu_is_exynos5())
 		exynos5_dp_phy_control(enable);
 }
+
+void power_ps_hold_setup(void)
+{
+	struct exynos5_power *power =
+		(struct exynos5_power *)samsung_get_base_power();
+
+	/* Set PS-Hold high */
+	setbits_le32(&power->ps_hold_control,
+			EXYNOS_PS_HOLD_CONTROL_DATA_HIGH);
+}
diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
index d2fdb59..8384cbb 100644
--- a/arch/arm/include/asm/arch-exynos/power.h
+++ b/arch/arm/include/asm/arch-exynos/power.h
@@ -864,4 +864,13 @@  void set_dp_phy_ctrl(unsigned int enable);
 
 #define EXYNOS_DP_PHY_ENABLE		(1 << 0)
 
+#define EXYNOS_PS_HOLD_CONTROL_DATA_HIGH	(1 << 8)
+
+/*
+ * 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 power_ps_hold_setup(void);
 #endif