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>
This commit is contained in:

committed by
Kevin Hilman

parent
ff999b8a09
commit
cd8ce15903
@@ -134,11 +134,22 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *
|
||||
* 2) CPU1 must re-enable the GIC distributor on
|
||||
* it's wakeup path.
|
||||
*/
|
||||
if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD))
|
||||
if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD)) {
|
||||
local_irq_disable();
|
||||
gic_dist_disable();
|
||||
}
|
||||
|
||||
clkdm_wakeup(cpu1_clkdm);
|
||||
clkdm_allow_idle(cpu1_clkdm);
|
||||
|
||||
if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD)) {
|
||||
while (gic_dist_disabled()) {
|
||||
udelay(1);
|
||||
cpu_relax();
|
||||
}
|
||||
gic_timer_retrigger();
|
||||
local_irq_enable();
|
||||
}
|
||||
} else {
|
||||
dsb_sev();
|
||||
booted = true;
|
||||
|
Reference in New Issue
Block a user