|
@@ -1636,6 +1636,24 @@ void __devinit smp_mpic_setup_cpu(int cpu)
|
|
|
{
|
|
|
mpic_setup_this_cpu();
|
|
|
}
|
|
|
+
|
|
|
+void mpic_reset_core(int cpu)
|
|
|
+{
|
|
|
+ struct mpic *mpic = mpic_primary;
|
|
|
+ u32 pir;
|
|
|
+ int cpuid = get_hard_smp_processor_id(cpu);
|
|
|
+
|
|
|
+ /* Set target bit for core reset */
|
|
|
+ pir = mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT));
|
|
|
+ pir |= (1 << cpuid);
|
|
|
+ mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir);
|
|
|
+ mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT));
|
|
|
+
|
|
|
+ /* Restore target bit after reset complete */
|
|
|
+ pir &= ~(1 << cpuid);
|
|
|
+ mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir);
|
|
|
+ mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT));
|
|
|
+}
|
|
|
#endif /* CONFIG_SMP */
|
|
|
|
|
|
#ifdef CONFIG_PM
|