summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAkshay Saraswat <akshay.s@samsung.com>2013-02-25 01:13:06 +0000
committerMinkyu Kang <mk7.kang@samsung.com>2013-03-12 17:07:31 +0900
commit3a0b1dae5b9b853559b87a2332a27d1ed6a91fb8 (patch)
treefa466a0120e4b4c401964149196ff319e92d82a9 /arch
parent8afcfc212415b8bacdf08b752aef7976e7da52a8 (diff)
downloadu-boot-imx-3a0b1dae5b9b853559b87a2332a27d1ed6a91fb8.zip
u-boot-imx-3a0b1dae5b9b853559b87a2332a27d1ed6a91fb8.tar.gz
u-boot-imx-3a0b1dae5b9b853559b87a2332a27d1ed6a91fb8.tar.bz2
Exynos5: TMU: Add hardware tripping
This adds hardware tripping at 110 degrees celsius which must enable forced system shutdown in case TMU fails to power off. Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/exynos/power.c12
-rw-r--r--arch/arm/include/asm/arch-exynos/power.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
index db7249e..6375a81 100644
--- a/arch/arm/cpu/armv7/exynos/power.c
+++ b/arch/arm/cpu/armv7/exynos/power.c
@@ -128,3 +128,15 @@ void set_xclkout(void)
if (cpu_is_exynos5())
exynos5_set_xclkout();
}
+
+/* Enables hardware tripping to power off the system when TMU fails */
+void set_hw_thermal_trip(void)
+{
+ if (cpu_is_exynos5()) {
+ struct exynos5_power *power =
+ (struct exynos5_power *)samsung_get_base_power();
+
+ /* PS_HOLD_CONTROL register ENABLE_HW_TRIP bit*/
+ setbits_le32(&power->ps_hold_control, POWER_ENABLE_HW_TRIP);
+ }
+}
diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
index 5f26337..3549667 100644
--- a/arch/arm/include/asm/arch-exynos/power.h
+++ b/arch/arm/include/asm/arch-exynos/power.h
@@ -857,6 +857,9 @@ void set_mipi_phy_ctrl(unsigned int dev_index, unsigned int enable);
void set_usbhost_phy_ctrl(unsigned int enable);
+/* Enables hardware tripping to power off the system when TMU fails */
+void set_hw_thermal_trip(void);
+
#define POWER_USB_HOST_PHY_CTRL_EN (1 << 0)
#define POWER_USB_HOST_PHY_CTRL_DISABLE (0 << 0)
@@ -865,6 +868,7 @@ void set_dp_phy_ctrl(unsigned int enable);
#define EXYNOS_DP_PHY_ENABLE (1 << 0)
#define EXYNOS_PS_HOLD_CONTROL_DATA_HIGH (1 << 8)
+#define POWER_ENABLE_HW_TRIP (1UL << 31)
/*
* Set ps_hold data driving value high