diff options
author | Magnus Damm <damm@opensource.se> | 2011-01-19 08:16:29 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-19 19:02:35 +0900 |
commit | 8a5a778665efb3a5f16ebb6fbc13356907e45775 (patch) | |
tree | d8a2978d4c1826b948667058d62c56931d880aab | |
parent | 24ee7d79c5885275a531431c3b687b3a7919eee4 (diff) |
sh: update INTC to clear IRQ sense valid flag
Clear the valid flag is in the INTC code.
Without this fix bit 7 of the sense register
is mistakenly set.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | drivers/sh/intc/chip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/sh/intc/chip.c b/drivers/sh/intc/chip.c index de885a0f917a..f33e2dd97934 100644 --- a/drivers/sh/intc/chip.c +++ b/drivers/sh/intc/chip.c @@ -173,7 +173,8 @@ int intc_set_priority(unsigned int irq, unsigned int prio) return 0; } -#define VALID(x) (x | 0x80) +#define SENSE_VALID_FLAG 0x80 +#define VALID(x) (x | SENSE_VALID_FLAG) static unsigned char intc_irq_sense_table[IRQ_TYPE_SENSE_MASK + 1] = { [IRQ_TYPE_EDGE_FALLING] = VALID(0), @@ -201,7 +202,8 @@ static int intc_set_type(struct irq_data *data, unsigned int type) ihp = intc_find_irq(d->sense, d->nr_sense, irq); if (ihp) { addr = INTC_REG(d, _INTC_ADDR_E(ihp->handle), 0); - intc_reg_fns[_INTC_FN(ihp->handle)](addr, ihp->handle, value); + intc_reg_fns[_INTC_FN(ihp->handle)](addr, ihp->handle, + value & ~SENSE_VALID_FLAG); } return 0; |