diff options
| author | Matthew McClintock <msm@freescale.com> | 2011-10-26 14:46:57 -0400 |
|---|---|---|
| committer | Kumar Gala <galak@kernel.crashing.org> | 2011-11-03 14:12:27 -0400 |
| commit | 44f16fcf2fba79cffb268d8f3c1f744efefa5dc9 (patch) | |
| tree | 536077de8f29c6b1502c528e1b00702d4f9559c3 /arch | |
| parent | cfadd83852eb6b9a015bc1ea396b98f395f073e0 (diff) | |
powerpc/85xx: issue 15 EOI after core reset for FSL CoreNet devices
This is listed as a requirement for Freescale CoreNet based devices (e.g
p4080ds with MPIC v4.x) after issuing a core reset to properly clear pending
interrupts.
Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/powerpc/sysdev/mpic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 9678081dc4e2..0842c6f8a3e6 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
| @@ -1748,6 +1748,7 @@ void mpic_reset_core(int cpu) | |||
| 1748 | struct mpic *mpic = mpic_primary; | 1748 | struct mpic *mpic = mpic_primary; |
| 1749 | u32 pir; | 1749 | u32 pir; |
| 1750 | int cpuid = get_hard_smp_processor_id(cpu); | 1750 | int cpuid = get_hard_smp_processor_id(cpu); |
| 1751 | int i; | ||
| 1751 | 1752 | ||
| 1752 | /* Set target bit for core reset */ | 1753 | /* Set target bit for core reset */ |
| 1753 | pir = mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT)); | 1754 | pir = mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT)); |
| @@ -1759,6 +1760,15 @@ void mpic_reset_core(int cpu) | |||
| 1759 | pir &= ~(1 << cpuid); | 1760 | pir &= ~(1 << cpuid); |
| 1760 | mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir); | 1761 | mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir); |
| 1761 | mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT)); | 1762 | mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT)); |
| 1763 | |||
| 1764 | /* Perform 15 EOI on each reset core to clear pending interrupts. | ||
| 1765 | * This is required for FSL CoreNet based devices */ | ||
| 1766 | if (mpic->flags & MPIC_FSL) { | ||
| 1767 | for (i = 0; i < 15; i++) { | ||
| 1768 | _mpic_write(mpic->reg_type, &mpic->cpuregs[cpuid], | ||
| 1769 | MPIC_CPU_EOI, 0); | ||
| 1770 | } | ||
| 1771 | } | ||
| 1762 | } | 1772 | } |
| 1763 | #endif /* CONFIG_SMP */ | 1773 | #endif /* CONFIG_SMP */ |
| 1764 | 1774 | ||
