SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH] sh: update INTC to clear IRQ sense valid flag
@ 2011-01-19  8:16 Magnus Damm
  2011-01-19 10:00 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2011-01-19  8:16 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

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>
---

 drivers/sh/intc/chip.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- 0001/drivers/sh/intc/chip.c
+++ work/drivers/sh/intc/chip.c	2011-01-18 14:45:38.000000000 +0900
@@ -173,7 +173,8 @@ int intc_set_priority(unsigned int irq, 
 	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
 	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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sh: update INTC to clear IRQ sense valid flag
  2011-01-19  8:16 [PATCH] sh: update INTC to clear IRQ sense valid flag Magnus Damm
@ 2011-01-19 10:00 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-01-19 10:00 UTC (permalink / raw)
  To: linux-sh

On Wed, Jan 19, 2011 at 05:16:29PM +0900, Magnus Damm wrote:
> Clear the valid flag is in the INTC code.
> Without this fix bit 7 of the sense register
> is mistakenly set.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-19 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19  8:16 [PATCH] sh: update INTC to clear IRQ sense valid flag Magnus Damm
2011-01-19 10:00 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox