diff options
Diffstat (limited to 'arch/mips/txx9/rbtx4927/irq.c')
-rw-r--r-- | arch/mips/txx9/rbtx4927/irq.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/mips/txx9/rbtx4927/irq.c b/arch/mips/txx9/rbtx4927/irq.c index 00cd5231da30..9c14ebb26cb4 100644 --- a/arch/mips/txx9/rbtx4927/irq.c +++ b/arch/mips/txx9/rbtx4927/irq.c | |||
@@ -133,15 +133,20 @@ static int toshiba_rbtx4927_irq_nested(int sw_irq) | |||
133 | u8 level3; | 133 | u8 level3; |
134 | 134 | ||
135 | level3 = readb(rbtx4927_imstat_addr) & 0x1f; | 135 | level3 = readb(rbtx4927_imstat_addr) & 0x1f; |
136 | if (level3) | 136 | if (unlikely(!level3)) |
137 | sw_irq = RBTX4927_IRQ_IOC + fls(level3) - 1; | 137 | return -1; |
138 | return sw_irq; | 138 | return RBTX4927_IRQ_IOC + __fls8(level3); |
139 | } | 139 | } |
140 | 140 | ||
141 | static void __init toshiba_rbtx4927_irq_ioc_init(void) | 141 | static void __init toshiba_rbtx4927_irq_ioc_init(void) |
142 | { | 142 | { |
143 | int i; | 143 | int i; |
144 | 144 | ||
145 | /* mask all IOC interrupts */ | ||
146 | writeb(0, rbtx4927_imask_addr); | ||
147 | /* clear SoftInt interrupts */ | ||
148 | writeb(0, rbtx4927_softint_addr); | ||
149 | |||
145 | for (i = RBTX4927_IRQ_IOC; | 150 | for (i = RBTX4927_IRQ_IOC; |
146 | i < RBTX4927_IRQ_IOC + RBTX4927_NR_IRQ_IOC; i++) | 151 | i < RBTX4927_IRQ_IOC + RBTX4927_NR_IRQ_IOC; i++) |
147 | set_irq_chip_and_handler(i, &toshiba_rbtx4927_irq_ioc_type, | 152 | set_irq_chip_and_handler(i, &toshiba_rbtx4927_irq_ioc_type, |