irqchip/mmp: only touch the PJ4 & FIQ bits on enable/disable
PATCH v5 1/1 irqchip/mmp: only touch the PJ4 & FIQ bits on enable/disable
Resetting the bit 4 disables the interrupt delivery to the "secure processor" core. This breaks the keyboard on a OLPC XO 1.75 laptop, where the firmware running on the "secure processor" bit-bangs the PS/2 protocol over the GPIO lines.
It is not clear what the rest of the bits are and Marvel was unhelpful when asked for documentation. Aside from the SP bit, there are probably priority bits.
Leaving the unknown bits as the firmware set them up seems to be a wiser course of action compared to just turning them off.
---
Changes since v4:
- Remove unused ICU_INT_ROUTE_SP_IRQ define
- Try to further clarify the commit message
Changes since v3:
- Use #defined instead of integer literals
Changes since v2:
- Correct subsystem maintainers on Cc (irqchip)
Changes since v1:
- Adjusted wording & ack from Pavel
--- drivers/irqchip/irq-mmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/irqchip/irq-mmp.c +5 -1
@@ -34,6 +34,9 @@#define SEL_INT_PENDING (1 << 6)#define SEL_INT_NUM_MASK 0x3f +#define MMP2_ICU_INT_ROUTE_PJ4_IRQ (1 << 5) +#define MMP2_ICU_INT_ROUTE_PJ4_FIQ (1 << 6) +struct icu_chip_data {int nr_irqs;unsigned int virq_base;
@@ -190,7 +193,8 @@ static const struct mmp_intc_conf mmp_conf = {static const struct mmp_intc_conf mmp2_conf = { .conf_enable =0x20 , .conf_disable =0x0 , - .conf_mask =0x7f , + .conf_mask =MMP2_ICU_INT_ROUTE_PJ4_IRQ | +MMP2_ICU_INT_ROUTE_PJ4_FIQ , }; static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)
Signature · 1 line
2.20.1
I guess the subject is supposed to read: "only touch the PJ4 *IRQ* & FIQ bits on enable/disable", right?
If that's the case, let me know, and I'll fix it up when applying it.
Quoted 48 lines · Lubomir Rintel
Resetting the bit 4 disables the interrupt delivery to the "secure processor" core. This breaks the keyboard on a OLPC XO 1.75 laptop, where the firmware running on the "secure processor" bit-bangs the PS/2 protocol over the GPIO lines.
It is not clear what the rest of the bits are and Marvel was unhelpful when asked for documentation. Aside from the SP bit, there are probably priority bits.
Leaving the unknown bits as the firmware set them up seems to be a wiser course of action compared to just turning them off.
Signed-off-by Lubomir Rintel <[email protected]>Acked-by Pavel Machek <[email protected]>---
Changes since v4:
- Remove unusedICU_INT_ROUTE_SP_IRQdefine
- Try to further clarify the commit messageChanges since v3:
- Use #defined instead of integer literalsChanges since v2:
- Correct subsystem maintainers on Cc (irqchip)Changes since v1:
- Adjusted wording & ack from Pavel--- drivers/irqchip/irq-mmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/irqchip/irq-mmp.c +3
-0@@ -34,6 +34,9 @@#define SEL_INT_PENDING (1 << 6)#define SEL_INT_NUM_MASK 0x3f +#define MMP2_ICU_INT_ROUTE_PJ4_IRQ (1 << 5) +#define MMP2_ICU_INT_ROUTE_PJ4_FIQ (1 << 6) +struct icu_chip_data {int nr_irqs;unsigned int virq_base;
drivers/irqchip/irq-mmp.c static const struct mmp_intc_conf mmp_conf = { · line 200
Quoted 9 lines
drivers/irqchip/irq-mmp.c +2
-1@@ -190,7 +193,8 @@ static const struct mmp_intc_conf mmp_conf = {static const struct mmp_intc_conf mmp2_conf = { .conf_enable =0x20 , .conf_disable =0x0 , - .conf_mask =0x7f , + .conf_mask =MMP2_ICU_INT_ROUTE_PJ4_IRQ | +MMP2_ICU_INT_ROUTE_PJ4_FIQ , }; static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)
Thanks,
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
Quoted 4 lines · Marc Zyngier
I guess the subject is supposed to read: "only touch the PJ4 *IRQ* & FIQ bits on enable/disable", right?
If that's the case, let me know, and I'll fix it up when applying it.
Yes, that would make more sense.
Thank you
Lubo
Quoted 62 lines · Lubomir Rintel
Quoted 48 lines
Resetting the bit 4 disables the interrupt delivery to the "secure processor" core. This breaks the keyboard on a OLPC XO 1.75 laptop, where the firmware running on the "secure processor" bit-bangs the PS/2 protocol over the GPIO lines.
It is not clear what the rest of the bits are and Marvel was unhelpful when asked for documentation. Aside from the SP bit, there are probably priority bits.
Leaving the unknown bits as the firmware set them up seems to be a wiser course of action compared to just turning them off.
Signed-off-by Lubomir Rintel <[email protected]>Acked-by Pavel Machek <[email protected]>---
Changes since v4:
- Remove unusedICU_INT_ROUTE_SP_IRQdefine
- Try to further clarify the commit messageChanges since v3:
- Use #defined instead of integer literalsChanges since v2:
- Correct subsystem maintainers on Cc (irqchip)Changes since v1:
- Adjusted wording & ack from Pavel--- drivers/irqchip/irq-mmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/irqchip/irq-mmp.c +3
-0@@ -34,6 +34,9 @@#define SEL_INT_PENDING (1 << 6)#define SEL_INT_NUM_MASK 0x3f +#define MMP2_ICU_INT_ROUTE_PJ4_IRQ (1 << 5) +#define MMP2_ICU_INT_ROUTE_PJ4_FIQ (1 << 6) +struct icu_chip_data {int nr_irqs;unsigned int virq_base;drivers/irqchip/irq-mmp.c static const struct mmp_intc_conf mmp_conf = { · line 200
Quoted 9 lines
drivers/irqchip/irq-mmp.c +2
-1@@ -190,7 +193,8 @@ static const struct mmp_intc_conf mmp_conf = {static const struct mmp_intc_conf mmp2_conf = { .conf_enable =0x20 , .conf_disable =0x0 , - .conf_mask =0x7f , + .conf_mask =MMP2_ICU_INT_ROUTE_PJ4_IRQ | +MMP2_ICU_INT_ROUTE_PJ4_FIQ , }; static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)Thanks,
M.