]> Pileus Git - ~andy/linux/blobdiff - arch/arm/mach-highbank/sysregs.h
Merge tag 'sunxi-fixes-for-3.8-rc4' of git://github.com/mripard/linux into fixes
[~andy/linux] / arch / arm / mach-highbank / sysregs.h
index e13e8ea7c6cb30fdf5863c668765d39904984754..70af9d13fcefefb1fad252c1a8c8a2bffa71ef3b 100644 (file)
@@ -44,28 +44,43 @@ static inline void highbank_set_core_pwr(void)
                writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu));
 }
 
-static inline void hignbank_set_pwr_suspend(void)
+static inline void highbank_clear_core_pwr(void)
+{
+       int cpu = cpu_logical_map(smp_processor_id());
+       if (scu_base_addr)
+               scu_power_mode(scu_base_addr, SCU_PM_NORMAL);
+       else
+               writel_relaxed(0, sregs_base + SREG_CPU_PWR_CTRL(cpu));
+}
+
+static inline void highbank_set_pwr_suspend(void)
 {
        writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ);
        highbank_set_core_pwr();
 }
 
-static inline void hignbank_set_pwr_shutdown(void)
+static inline void highbank_set_pwr_shutdown(void)
 {
        writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ);
        highbank_set_core_pwr();
 }
 
-static inline void hignbank_set_pwr_soft_reset(void)
+static inline void highbank_set_pwr_soft_reset(void)
 {
        writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
        highbank_set_core_pwr();
 }
 
-static inline void hignbank_set_pwr_hard_reset(void)
+static inline void highbank_set_pwr_hard_reset(void)
 {
        writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
        highbank_set_core_pwr();
 }
 
+static inline void highbank_clear_pwr_request(void)
+{
+       writel(~0UL, sregs_base + HB_SREG_A9_PWR_REQ);
+       highbank_clear_core_pwr();
+}
+
 #endif