| Submitter | Akshay Saraswat |
|---|---|
| Date | Jan. 21, 2013, 11:11 a.m. |
| Message ID | <1358766705-2118-3-git-send-email-akshay.s@samsung.com> |
| Download | mbox | patch |
| Permalink | /patch/214116/ |
| State | Changes Requested |
| Delegated to: | Minkyu Kang |
| Headers | show |
Comments
On Mon, Jan 21, 2013 at 3:11 AM, Akshay Saraswat <akshay.s@samsung.com> wrote: > Adding API in power for system shutdown when tripping value is reached > in Exynos Thermal Management Unit. > > Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> > --- > Changes since v4: > - Changed API name from power_shutdown to generic board_poweroff defined in commomn.h. > > arch/arm/cpu/armv7/exynos/power.c | 15 +++++++++++++++ > arch/arm/include/asm/arch-exynos/power.h | 1 + > 2 files changed, 16 insertions(+) > > diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c > index d4bce6d..1d26982 100644 > --- a/arch/arm/cpu/armv7/exynos/power.c > +++ b/arch/arm/cpu/armv7/exynos/power.c > @@ -95,3 +95,18 @@ void set_dp_phy_ctrl(unsigned int enable) > if (cpu_is_exynos5()) > exynos5_dp_phy_control(enable); > } > + > +/* > + * This function never returns. > + * When called this function makes system hang and PAD driving value high > + * which in turn makes system power down. > + */ > +void board_poweroff(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..7463036 100644 > --- a/arch/arm/include/asm/arch-exynos/power.h > +++ b/arch/arm/include/asm/arch-exynos/power.h > @@ -863,5 +863,6 @@ 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) > > #endif > -- > 1.7.9.5 >
Patch
diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c index d4bce6d..1d26982 100644 --- a/arch/arm/cpu/armv7/exynos/power.c +++ b/arch/arm/cpu/armv7/exynos/power.c @@ -95,3 +95,18 @@ void set_dp_phy_ctrl(unsigned int enable) if (cpu_is_exynos5()) exynos5_dp_phy_control(enable); } + +/* + * This function never returns. + * When called this function makes system hang and PAD driving value high + * which in turn makes system power down. + */ +void board_poweroff(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..7463036 100644 --- a/arch/arm/include/asm/arch-exynos/power.h +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -863,5 +863,6 @@ 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) #endif
Adding API in power for system shutdown when tripping value is reached in Exynos Thermal Management Unit. Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> --- Changes since v4: - Changed API name from power_shutdown to generic board_poweroff defined in commomn.h. arch/arm/cpu/armv7/exynos/power.c | 15 +++++++++++++++ arch/arm/include/asm/arch-exynos/power.h | 1 + 2 files changed, 16 insertions(+)