mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
irqchip: mips-gic: Setup EIC mode on each CPU if it's in use
When EIC mode is in use (cpu_has_veic is true) enable it on each CPU during GIC initialisation. Otherwise there may be a mismatch between the hardware default interrupt model & that expected by the kernel. Signed-off-by: Paul Burton <[email protected]> Reviewed-by: Matt Redfearn <[email protected]> Tested-by: Matt Redfearn <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Cc: Paul Burton <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/13274/ Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
parent
d642e4e7b4
commit
ba01cf0e12
1 changed files with 9 additions and 1 deletions
|
|
@ -968,7 +968,7 @@ static void __init __gic_init(unsigned long gic_base_addr,
|
|||
unsigned int cpu_vec, unsigned int irqbase,
|
||||
struct device_node *node)
|
||||
{
|
||||
unsigned int gicconfig;
|
||||
unsigned int gicconfig, cpu;
|
||||
unsigned int v[2];
|
||||
|
||||
__gic_base_addr = gic_base_addr;
|
||||
|
|
@ -985,6 +985,14 @@ static void __init __gic_init(unsigned long gic_base_addr,
|
|||
gic_vpes = gic_vpes + 1;
|
||||
|
||||
if (cpu_has_veic) {
|
||||
/* Set EIC mode for all VPEs */
|
||||
for_each_present_cpu(cpu) {
|
||||
gic_write(GIC_REG(VPE_LOCAL, GIC_VPE_OTHER_ADDR),
|
||||
mips_cm_vp_id(cpu));
|
||||
gic_write(GIC_REG(VPE_OTHER, GIC_VPE_CTL),
|
||||
GIC_VPE_CTL_EIC_MODE_MSK);
|
||||
}
|
||||
|
||||
/* Always use vector 1 in EIC mode */
|
||||
gic_cpu_pin = 0;
|
||||
timer_cpu_pin = gic_cpu_pin;
|
||||
|
|
|
|||
Loading…
Reference in a new issue