Skip to content

Commit

Permalink
sh: update INTC to clear IRQ sense valid flag
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Jan 19, 2011
1 parent 24ee7d7 commit 8a5a778
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/sh/intc/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8a5a778

Please sign in to comment.