aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2018-05-17 18:36:20 -0400
committerTony Lindgren <tony@atomide.com>2018-05-18 10:26:33 -0400
commitf74297dd9354c7115988c5e640d89fcfffbc70a5 (patch)
treeb0aaeb2f0ef2da4b14128ffc0fa60097eae9cb93
parent60cc43fc888428bb2f18f08997432d426a243338 (diff)
ARM: OMAP2+: Make sure LOGICRETSTATE bits are not cleared
We may have LOGICRETSTATE cleared by the bootloader or kexec boot. Currently this means we will see lost GPIO interrupts at least for network interfaces such as wlcore and smsc911x if PER hits retention. Let's fix the issue by making sure LOGICRETSTATE is set. Once we have GPIOs working with wakeirqs then we should be able to clear it. Cc: Keerthy <j-keerthy@ti.com> Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/pm44xx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index b3870220612e..78e1ace7d17d 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -131,6 +131,19 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
131 return 0; 131 return 0;
132 } 132 }
133 133
134 /*
135 * Bootloader or kexec boot may have LOGICRETSTATE cleared
136 * for some domains. This is the case when kexec booting from
137 * Android kernels that support off mode for example.
138 * Make sure it's set at least for core and per, otherwise
139 * we currently will see lost GPIO interrupts for wlcore and
140 * smsc911x at least if per hits retention during idle.
141 */
142 if (!strncmp(pwrdm->name, "core", 4) ||
143 !strncmp(pwrdm->name, "l4per", 5) ||
144 !strncmp(pwrdm->name, "wkup", 4))
145 pwrdm_set_logic_retst(pwrdm, PWRDM_POWER_RET);
146
134 pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC); 147 pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC);
135 if (!pwrst) 148 if (!pwrst)
136 return -ENOMEM; 149 return -ENOMEM;