[U-Boot] [PATCH 3/8] EXYNOS5: Power down API for Thermal Management Unit

Hatim Ali hatim.rv at samsung.com
Tue Nov 6 11:18:40 CET 2012


From: Akshay Saraswat <akshay.s at samsung.com>

Adding API in power for system shutdown when tripping value is reached
in Exynos Thermal Management Unit.

Signed-off-by: Akshay Saraswat <akshay.s at samsung.com>

diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
index d4bce6d..a6d8827 100644
--- a/arch/arm/cpu/armv7/exynos/power.c
+++ b/arch/arm/cpu/armv7/exynos/power.c
@@ -95,3 +95,14 @@ void set_dp_phy_ctrl(unsigned int enable)
 	if (cpu_is_exynos5())
 		exynos5_dp_phy_control(enable);
 }
+
+/* This function never returns */
+void power_shutdown(void)
+{
+	struct exynos5_power *power =
+		(struct exynos5_power *)samsung_get_base_power();
+
+	clrbits_le32(&power->ps_hold_control, POWER_PS_HOLD_CONTROL_DATA_HIGH);
+
+	hang();
+}
diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
index d2fdb59..7d798ba 100644
--- a/arch/arm/include/asm/arch-exynos/power.h
+++ b/arch/arm/include/asm/arch-exynos/power.h
@@ -863,5 +863,9 @@ void set_usbhost_phy_ctrl(unsigned int enable);
 void set_dp_phy_ctrl(unsigned int enable);
 
 #define EXYNOS_DP_PHY_ENABLE		(1 << 0)
+#define POWER_PS_HOLD_CONTROL_DATA_HIGH         (1 << 8)
+
+/* This function never returns */
+void power_shutdown(void);
 
 #endif
-- 
1.7.2.3



More information about the U-Boot mailing list