]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/blackfin/mach-common/pm.c
Merge branch 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc...
[linux-2.6-omap-h63xx.git] / arch / blackfin / mach-common / pm.c
index e28c6af1f4158e12b89bcecbee68363ede5d5745..f48a6aebb49b4e75abb7919a209c742f3e2b4369 100644 (file)
@@ -71,7 +71,7 @@ void bfin_pm_suspend_standby_enter(void)
        gpio_pm_wakeup_request(CONFIG_PM_WAKEUP_GPIO_NUMBER, WAKEUP_TYPE);
 #endif
 
-       local_irq_save(flags);
+       local_irq_save_hw(flags);
        bfin_pm_standby_setup();
 
 #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER
@@ -82,26 +82,27 @@ void bfin_pm_suspend_standby_enter(void)
 
        bfin_pm_standby_restore();
 
-#if defined(CONFIG_BF54x) || defined(CONFIG_BF52x)  || defined(CONFIG_BF561)
+#ifdef SIC_IWR0
        bfin_write_SIC_IWR0(IWR_DISABLE_ALL);
-#if defined(CONFIG_BF52x)
+# ifdef SIC_IWR1
        /* BF52x system reset does not properly reset SIC_IWR1 which
         * will screw up the bootrom as it relies on MDMA0/1 waking it
         * up from IDLE instructions.  See this report for more info:
         * http://blackfin.uclinux.org/gf/tracker/4323
         */
-       bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11));
-#else
-       bfin_write_SIC_IWR1(IWR_DISABLE_ALL);
-#endif
-# ifdef CONFIG_BF54x
+       if (ANOMALY_05000435)
+               bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11));
+       else
+               bfin_write_SIC_IWR1(IWR_DISABLE_ALL);
+# endif
+# ifdef SIC_IWR2
        bfin_write_SIC_IWR2(IWR_DISABLE_ALL);
 # endif
 #else
        bfin_write_SIC_IWR(IWR_DISABLE_ALL);
 #endif
 
-       local_irq_restore(flags);
+       local_irq_restore_hw(flags);
 }
 
 int bf53x_suspend_l1_mem(unsigned char *memptr)
@@ -245,12 +246,12 @@ int bfin_pm_suspend_mem_enter(void)
        wakeup |= GPWE;
 #endif
 
-       local_irq_save(flags);
+       local_irq_save_hw(flags);
 
        ret = blackfin_dma_suspend();
 
        if (ret) {
-               local_irq_restore(flags);
+               local_irq_restore_hw(flags);
                kfree(memptr);
                return ret;
        }
@@ -271,7 +272,7 @@ int bfin_pm_suspend_mem_enter(void)
        bfin_gpio_pm_hibernate_restore();
        blackfin_dma_resume();
 
-       local_irq_restore(flags);
+       local_irq_restore_hw(flags);
        kfree(memptr);
 
        return 0;