ARM: OMAP4: retrigger localtimers after re-enabling gic
authorColin Cross <ccross@android.com>
Thu, 18 Oct 2012 09:20:08 +0000 (12:20 +0300)
committerKevin Hilman <khilman@ti.com>
Mon, 5 Nov 2012 22:26:43 +0000 (14:26 -0800)
commitcd8ce159031813eb870a5f3d5b27c3be36cd6e3a
treedeaa9a4ccac205b288aff709f39c0b622d0b91b7
parentff999b8a0983ee15668394ed49e38d3568fc6859
ARM: OMAP4: retrigger localtimers after re-enabling gic

'Workaround for ROM bug because of CA9 r2pX gic control'
register change disables the gic distributor while the secondary
cpu is being booted.  If a localtimer interrupt on the primary cpu
occurs when the distributor is turned off, the interrupt is lost,
and the localtimer never fires again.

Make the primary cpu wait for the secondary cpu to reenable the
gic distributor (with interrupts off for safety), and then
check if the pending bit is set in the localtimer but not the
gic.  If so, ack it in the localtimer, and reset the timer with
the minimum timeout to trigger a new timer interrupt.

Signed-off-by: Colin Cross <ccross@android.com>
[s-jan@ti.com: adapted to k3.4 + validated functionality]
Signed-off-by: Sebastien Jan <s-jan@ti.com>
[t-kristo@ti.com: dropped generic ARM kernel exports from the code, rebased
 to mainline]
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-omap2/omap4-common.c