Commit bdb7a244985abc84658525ce82b6a40ffdf9d01d
1 parent
8d78a20015
Exists in
v3.2_SMARCT335xPSP_04.06.00.11
and in
3 other branches
ARM: OMAP2+: AM33XX: Fix race between request_irq and gpio_mask_irq
After random iteration, uart standby using (gpio pin configs) hangs. Upon deep observation (and lots of debug prints), it was observed that the GPIO Rising/Falling detect registers were cleared (IRQ disabled) before system entered standby. Any UART activity (key press) was not detected. This registers were properly setup by request_irq call from am33xx_pm_prepare_late() (initial suspend stage). However, driver suspend calls (.suspend()) come in later stage and due to some race condition, gpio_mask_irq() masks/clears above registers. The fix is to call the standby setup function (which calls request_irq) at final stage just before the actual suspend call. This fix was tested by placing the system under standby stress test for more than 20 Hours. Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
arch/arm/mach-omap2/pm33xx.c
... | ... | @@ -80,7 +80,6 @@ |
80 | 80 | |
81 | 81 | am335x_save_padconf(); |
82 | 82 | am33xx_setup_pinmux_on_suspend(); |
83 | - am33xx_standby_setup(suspend_state); | |
84 | 83 | |
85 | 84 | return ret; |
86 | 85 | } |
... | ... | @@ -176,6 +175,8 @@ |
176 | 175 | pr_err("Could not program GFX to low power state\n"); |
177 | 176 | |
178 | 177 | omap3_intc_suspend(); |
178 | + | |
179 | + am33xx_standby_setup(suspend_state); | |
179 | 180 | |
180 | 181 | writel(0x0, AM33XX_CM_MPU_MPU_CLKCTRL); |
181 | 182 |