[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1515148270-9391-5-git-send-email-matt.redfearn@mips.com>
Date: Fri, 5 Jan 2018 10:31:08 +0000
From: Matt Redfearn <matt.redfearn@...s.com>
To: Ralf Baechle <ralf@...ux-mips.org>,
Thomas Gleixner <tglx@...utronix.de>
CC: <linux-mips@...ux-mips.org>,
Matt Redfearn <matt.redfearn@...s.com>,
"Marc Zyngier" <marc.zyngier@....com>,
Jason Cooper <jason@...edaemon.net>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH 4/6] irqchip/mips-gic: Always attempt to enable EIC mode
The MIPS GIC supports running in External Interrupt Controller (EIC)
mode, in which the GIC can raise up to 64 separate interrupts rather
than the usual 6. This mode is enabled by setting bit GIC_VL_CTL.EIC. If
the bit sticks, then EIC mode is present and becomes enabled. Otherwise
this bit is read-only 0 and setting it will have no effect.
The CP0 register Config3 bit VEIC indicates the status of EIC mode, and
effectively reflects GIC_VL_CTL.EIC. After attempting to enable EIC
mode, read back Config3.VEIC to determine if VEIC mode is present and
has been activated. If so, update the boot CPU flags to reflect that
VEIC mode is now active.
Signed-off-by: Matt Redfearn <matt.redfearn@...s.com>
---
drivers/irqchip/irq-mips-gic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index ef92a4d2038e..ee391f42e97d 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -725,6 +725,9 @@ static int __init gic_of_init(struct device_node *node,
gic_shared_intrs >>= __ffs(GIC_CONFIG_NUMINTERRUPTS);
gic_shared_intrs = (gic_shared_intrs + 1) * 8;
+ /* Enable EIC mode if supported. */
+ mips_gic_enable_eic();
+
if (cpu_has_veic) {
/* Always use vector 1 in EIC mode */
gic_cpu_pin = 0;
--
2.7.4
Powered by blists - more mailing lists