summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorRajeshwari Shinde <rajeshwari.s@samsung.com>2013-02-12 20:40:01 +0000
committerMinkyu Kang <mk7.kang@samsung.com>2013-02-20 16:48:17 +0900
commit51ff1eda6f788fc76666d275a87a7c7aff32baa8 (patch)
tree2bb0c802ac293e98543f1f74c88f0da40099b247 /arch/arm
parent9f024f62e4604274a23213dcee30016092e32e7b (diff)
downloadu-boot-imx-51ff1eda6f788fc76666d275a87a7c7aff32baa8.zip
u-boot-imx-51ff1eda6f788fc76666d275a87a7c7aff32baa8.tar.gz
u-boot-imx-51ff1eda6f788fc76666d275a87a7c7aff32baa8.tar.bz2
EXYNOS5: Add function to setup set ps hold
This patch adds a function to set ps_hold data driving value high. This enables the machine to stay powered on even 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> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/armv7/exynos/power.c16
-rw-r--r--arch/arm/include/asm/arch-exynos/power.h9
2 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
index d4bce6d..400c8bc 100644
--- a/arch/arm/cpu/armv7/exynos/power.c
+++ b/arch/arm/cpu/armv7/exynos/power.c
@@ -95,3 +95,19 @@ void set_dp_phy_ctrl(unsigned int enable)
if (cpu_is_exynos5())
exynos5_dp_phy_control(enable);
}
+
+static void exynos5_set_ps_hold_ctrl(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);
+}
+
+void set_ps_hold_ctrl(void)
+{
+ if (cpu_is_exynos5())
+ exynos5_set_ps_hold_ctrl();
+}
diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
index d2fdb59..f2f73fa 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 set_ps_hold_ctrl(void);
#endif