]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/irqchip-mmp-only-touch-the-pj4-irq-fiq-bits-on-enabl.patch
Linux 3.18.137
[thirdparty/kernel/stable-queue.git] / queue-4.4 / irqchip-mmp-only-touch-the-pj4-irq-fiq-bits-on-enabl.patch
1 From 7d5d23ca00fb8354f93c8ae2cc8854323ef626bb Mon Sep 17 00:00:00 2001
2 From: Lubomir Rintel <lkundrak@v3.sk>
3 Date: Mon, 28 Jan 2019 16:59:35 +0100
4 Subject: irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable
5
6 [ Upstream commit 2380a22b60ce6f995eac806e69c66e397b59d045 ]
7
8 Resetting bit 4 disables the interrupt delivery to the "secure
9 processor" core. This breaks the keyboard on a OLPC XO 1.75 laptop,
10 where the firmware running on the "secure processor" bit-bangs the
11 PS/2 protocol over the GPIO lines.
12
13 It is not clear what the rest of the bits are and Marvell was unhelpful
14 when asked for documentation. Aside from the SP bit, there are probably
15 priority bits.
16
17 Leaving the unknown bits as the firmware set them up seems to be a wiser
18 course of action compared to just turning them off.
19
20 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
21 Acked-by: Pavel Machek <pavel@ucw.cz>
22 [maz: fixed-up subject and commit message]
23 Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
24 Signed-off-by: Sasha Levin <sashal@kernel.org>
25 ---
26 drivers/irqchip/irq-mmp.c | 6 +++++-
27 1 file changed, 5 insertions(+), 1 deletion(-)
28
29 diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
30 index 013fc9659a84..2fe2bcb63a71 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 struct mmp_intc_conf mmp_conf = {
44 static 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 --
54 2.19.1
55