]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.29/irqchip-mmp-only-touch-the-pj4-irq-fiq-bits-on-enabl.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.19.29 / irqchip-mmp-only-touch-the-pj4-irq-fiq-bits-on-enabl.patch
CommitLineData
7748c0ed
SL
1From c15a141cf78e69cae893c0e9607244522538f86e Mon Sep 17 00:00:00 2001
2From: Lubomir Rintel <lkundrak@v3.sk>
3Date: Mon, 28 Jan 2019 16:59:35 +0100
4Subject: irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable
5
6[ Upstream commit 2380a22b60ce6f995eac806e69c66e397b59d045 ]
7
8Resetting bit 4 disables the interrupt delivery to the "secure
9processor" core. This breaks the keyboard on a OLPC XO 1.75 laptop,
10where the firmware running on the "secure processor" bit-bangs the
11PS/2 protocol over the GPIO lines.
12
13It is not clear what the rest of the bits are and Marvell was unhelpful
14when asked for documentation. Aside from the SP bit, there are probably
15priority bits.
16
17Leaving the unknown bits as the firmware set them up seems to be a wiser
18course of action compared to just turning them off.
19
20Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
21Acked-by: Pavel Machek <pavel@ucw.cz>
22[maz: fixed-up subject and commit message]
23Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
24Signed-off-by: Sasha Levin <sashal@kernel.org>
25---
26 drivers/irqchip/irq-mmp.c | 6 +++++-
27 1 file changed, 5 insertions(+), 1 deletion(-)
28
29diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
30index 25f32e1d7764..3496b61a312a 100644
31--- a/drivers/irqchip/irq-mmp.c
32+++ b/drivers/irqchip/irq-mmp.c
33@@ -34,6 +34,9 @@
34 #define SEL_INT_PENDING (1 << 6)
35 #define SEL_INT_NUM_MASK 0x3f
36
37+#define MMP2_ICU_INT_ROUTE_PJ4_IRQ (1 << 5)
38+#define MMP2_ICU_INT_ROUTE_PJ4_FIQ (1 << 6)
39+
40 struct icu_chip_data {
41 int nr_irqs;
42 unsigned int virq_base;
43@@ -190,7 +193,8 @@ static const struct mmp_intc_conf mmp_conf = {
44 static const struct mmp_intc_conf mmp2_conf = {
45 .conf_enable = 0x20,
46 .conf_disable = 0x0,
47- .conf_mask = 0x7f,
48+ .conf_mask = MMP2_ICU_INT_ROUTE_PJ4_IRQ |
49+ MMP2_ICU_INT_ROUTE_PJ4_FIQ,
50 };
51
52 static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)
53--
542.19.1
55