Skip to contentSkip to conversation

sh: extend INTC with force_disable

PATCH In review Magnus Damm 2 participants 2 messages Feb 15, 2010 – Feb 16, 2010 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: extend INTC with force_disable

From: Magnus Damm <[email protected]>

Extend the shared INTC code with force_disable support to allow keeping mask bits statically disabled. Needed for SDHI support to mask out unsupported interrupt sources.

---

 drivers/sh/intc.c       |    3 +++
 include/linux/sh_intc.h |    1 +
 2 files changed, 4 insertions(+)
drivers/sh/intc.c +3 -0
@@ -851,6 +851,9 @@ void __init register_intc_controller(str
 		d->chip.mask_ack = intc_mask_ack;
 	}
 
+	/* disable bits matching force_disable before registering irqs */
+	if (desc->force_disable)
+		intc_enable_disable_enum(desc, d, desc->force_disable, 0);
 
 	/* disable bits matching force_enable before registering irqs */
 	if (desc->force_enable)
include/linux/sh_intc.h +1 -0
@@ -72,6 +72,7 @@ struct intc_hw_desc {
 struct intc_desc {
 	char *name;
 	intc_enum force_enable;
+	intc_enum force_disable;
 	struct intc_hw_desc hw;
 };
 
#1 lore raw
Quoted 3 lines · Magnus Damm

Extend the shared INTC code with force_disable support to allow keeping mask bits statically disabled. Needed for SDHI support to mask out unsupported interrupt sources.

Quoted 5 lines · Magnus Damm

Update the sh7724 INTC tables with force_enable support to mask out pending unsupported SDHI interrupt sources.

Without this patch the kernel locks up due to a pending SDHI interrupt that the tmio_mmc driver cannot handle.

Both applied, thanks.