diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/omap-mpuss-lowpower.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-wakeupgen.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm44xx.c | 12 |
4 files changed, 17 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 207fce2d6932..297352f214df 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c | |||
@@ -242,6 +242,10 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state) | |||
242 | save_state = 1; | 242 | save_state = 1; |
243 | break; | 243 | break; |
244 | case PWRDM_POWER_RET: | 244 | case PWRDM_POWER_RET: |
245 | if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) { | ||
246 | save_state = 0; | ||
247 | break; | ||
248 | } | ||
245 | default: | 249 | default: |
246 | /* | 250 | /* |
247 | * CPUx CSWR is invalid hardware state. Also CPUx OSWR | 251 | * CPUx CSWR is invalid hardware state. Also CPUx OSWR |
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c index e844e1603d76..f961c46453b9 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "soc.h" | 32 | #include "soc.h" |
33 | #include "omap4-sar-layout.h" | 33 | #include "omap4-sar-layout.h" |
34 | #include "common.h" | 34 | #include "common.h" |
35 | #include "pm.h" | ||
35 | 36 | ||
36 | #define AM43XX_NR_REG_BANKS 7 | 37 | #define AM43XX_NR_REG_BANKS 7 |
37 | #define AM43XX_IRQS 224 | 38 | #define AM43XX_IRQS 224 |
@@ -381,7 +382,7 @@ static struct notifier_block irq_notifier_block = { | |||
381 | static void __init irq_pm_init(void) | 382 | static void __init irq_pm_init(void) |
382 | { | 383 | { |
383 | /* FIXME: Remove this when MPU OSWR support is added */ | 384 | /* FIXME: Remove this when MPU OSWR support is added */ |
384 | if (!soc_is_omap54xx()) | 385 | if (!IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) |
385 | cpu_pm_register_notifier(&irq_notifier_block); | 386 | cpu_pm_register_notifier(&irq_notifier_block); |
386 | } | 387 | } |
387 | #else | 388 | #else |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index e150102d6c06..425bfcd67db6 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -101,6 +101,7 @@ static inline void enable_omap3630_toggle_l2_on_restore(void) { } | |||
101 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ | 101 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ |
102 | 102 | ||
103 | #define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) | 103 | #define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) |
104 | #define PM_OMAP4_CPU_OSWR_DISABLE (1 << 1) | ||
104 | 105 | ||
105 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) | 106 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) |
106 | extern u16 pm44xx_errata; | 107 | extern u16 pm44xx_errata; |
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index b6f243db200d..64df620075a5 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c | |||
@@ -36,6 +36,8 @@ struct power_state { | |||
36 | struct list_head node; | 36 | struct list_head node; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | static u32 cpu_suspend_state = PWRDM_POWER_OFF; | ||
40 | |||
39 | static LIST_HEAD(pwrst_list); | 41 | static LIST_HEAD(pwrst_list); |
40 | 42 | ||
41 | #ifdef CONFIG_SUSPEND | 43 | #ifdef CONFIG_SUSPEND |
@@ -66,7 +68,7 @@ static int omap4_pm_suspend(void) | |||
66 | * domain CSWR is not supported by hardware. | 68 | * domain CSWR is not supported by hardware. |
67 | * More details can be found in OMAP4430 TRM section 4.3.4.2. | 69 | * More details can be found in OMAP4430 TRM section 4.3.4.2. |
68 | */ | 70 | */ |
69 | omap4_enter_lowpower(cpu_id, PWRDM_POWER_OFF); | 71 | omap4_enter_lowpower(cpu_id, cpu_suspend_state); |
70 | 72 | ||
71 | /* Restore next powerdomain state */ | 73 | /* Restore next powerdomain state */ |
72 | list_for_each_entry(pwrst, &pwrst_list, node) { | 74 | list_for_each_entry(pwrst, &pwrst_list, node) { |
@@ -112,8 +114,11 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | |||
112 | * through hotplug path and CPU0 explicitly programmed | 114 | * through hotplug path and CPU0 explicitly programmed |
113 | * further down in the code path | 115 | * further down in the code path |
114 | */ | 116 | */ |
115 | if (!strncmp(pwrdm->name, "cpu", 3)) | 117 | if (!strncmp(pwrdm->name, "cpu", 3)) { |
118 | if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) | ||
119 | cpu_suspend_state = PWRDM_POWER_RET; | ||
116 | return 0; | 120 | return 0; |
121 | } | ||
117 | 122 | ||
118 | pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC); | 123 | pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC); |
119 | if (!pwrst) | 124 | if (!pwrst) |
@@ -238,6 +243,9 @@ int __init omap4_pm_init_early(void) | |||
238 | if (cpu_is_omap446x()) | 243 | if (cpu_is_omap446x()) |
239 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; | 244 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; |
240 | 245 | ||
246 | if (soc_is_omap54xx() || soc_is_dra7xx()) | ||
247 | pm44xx_errata |= PM_OMAP4_CPU_OSWR_DISABLE; | ||
248 | |||
241 | return 0; | 249 | return 0; |
242 | } | 250 | } |
243 | 251 | ||