diff options
Diffstat (limited to 'arch/blackfin/mach-common/pm.c')
-rw-r--r-- | arch/blackfin/mach-common/pm.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index e28c6af1f415..d3d70fd67c16 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c | |||
@@ -71,7 +71,7 @@ void bfin_pm_suspend_standby_enter(void) | |||
71 | gpio_pm_wakeup_request(CONFIG_PM_WAKEUP_GPIO_NUMBER, WAKEUP_TYPE); | 71 | gpio_pm_wakeup_request(CONFIG_PM_WAKEUP_GPIO_NUMBER, WAKEUP_TYPE); |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | local_irq_save(flags); | 74 | local_irq_save_hw(flags); |
75 | bfin_pm_standby_setup(); | 75 | bfin_pm_standby_setup(); |
76 | 76 | ||
77 | #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER | 77 | #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER |
@@ -82,15 +82,19 @@ void bfin_pm_suspend_standby_enter(void) | |||
82 | 82 | ||
83 | bfin_pm_standby_restore(); | 83 | bfin_pm_standby_restore(); |
84 | 84 | ||
85 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) | 85 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) || \ |
86 | defined(CONFIG_BF538) || defined(CONFIG_BF539) || defined(CONFIG_BF51x) | ||
86 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); | 87 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); |
87 | #if defined(CONFIG_BF52x) | 88 | #if defined(CONFIG_BF52x) || defined(CONFIG_BF51x) |
88 | /* BF52x system reset does not properly reset SIC_IWR1 which | 89 | /* BF52x system reset does not properly reset SIC_IWR1 which |
89 | * will screw up the bootrom as it relies on MDMA0/1 waking it | 90 | * will screw up the bootrom as it relies on MDMA0/1 waking it |
90 | * up from IDLE instructions. See this report for more info: | 91 | * up from IDLE instructions. See this report for more info: |
91 | * http://blackfin.uclinux.org/gf/tracker/4323 | 92 | * http://blackfin.uclinux.org/gf/tracker/4323 |
92 | */ | 93 | */ |
93 | bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11)); | 94 | if (ANOMALY_05000435) |
95 | bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11)); | ||
96 | else | ||
97 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); | ||
94 | #else | 98 | #else |
95 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); | 99 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); |
96 | #endif | 100 | #endif |
@@ -101,7 +105,7 @@ void bfin_pm_suspend_standby_enter(void) | |||
101 | bfin_write_SIC_IWR(IWR_DISABLE_ALL); | 105 | bfin_write_SIC_IWR(IWR_DISABLE_ALL); |
102 | #endif | 106 | #endif |
103 | 107 | ||
104 | local_irq_restore(flags); | 108 | local_irq_restore_hw(flags); |
105 | } | 109 | } |
106 | 110 | ||
107 | int bf53x_suspend_l1_mem(unsigned char *memptr) | 111 | int bf53x_suspend_l1_mem(unsigned char *memptr) |
@@ -245,12 +249,12 @@ int bfin_pm_suspend_mem_enter(void) | |||
245 | wakeup |= GPWE; | 249 | wakeup |= GPWE; |
246 | #endif | 250 | #endif |
247 | 251 | ||
248 | local_irq_save(flags); | 252 | local_irq_save_hw(flags); |
249 | 253 | ||
250 | ret = blackfin_dma_suspend(); | 254 | ret = blackfin_dma_suspend(); |
251 | 255 | ||
252 | if (ret) { | 256 | if (ret) { |
253 | local_irq_restore(flags); | 257 | local_irq_restore_hw(flags); |
254 | kfree(memptr); | 258 | kfree(memptr); |
255 | return ret; | 259 | return ret; |
256 | } | 260 | } |
@@ -271,7 +275,7 @@ int bfin_pm_suspend_mem_enter(void) | |||
271 | bfin_gpio_pm_hibernate_restore(); | 275 | bfin_gpio_pm_hibernate_restore(); |
272 | blackfin_dma_resume(); | 276 | blackfin_dma_resume(); |
273 | 277 | ||
274 | local_irq_restore(flags); | 278 | local_irq_restore_hw(flags); |
275 | kfree(memptr); | 279 | kfree(memptr); |
276 | 280 | ||
277 | return 0; | 281 | return 0; |