linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/cpm2 Fix set interrupt type
@ 2009-01-27  8:44 paulfax
  2009-01-27 14:31 ` Kumar Gala
  2009-02-06 16:44 ` Kumar Gala
  0 siblings, 2 replies; 6+ messages in thread
From: paulfax @ 2009-01-27  8:44 UTC (permalink / raw)
  To: linuxppc-dev

This is a simple change to correct problems when using set_irq_type on platforms using CPM2.
This code correct the problem on most platform but still fails on 8272 derived platforms for some interrupts.
On 8272 PC2 & 3 are missing and PC 23 & 29 are added, which this patch does not address.

Signed-off-by: Paul Bilke <paul at conspiracy.net>
---




diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c
index b16ca3e..78f1f7c 100644
--- a/arch/powerpc/sysdev/cpm2_pic.c
+++ b/arch/powerpc/sysdev/cpm2_pic.c
@@ -165,7 +165,7 @@ static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type)
                        edibit = (14 - (src - CPM2_IRQ_EXT1));
        else
                if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0)
-                       edibit = (31 - (src - CPM2_IRQ_PORTC15));
+                       edibit = (31 - (CPM2_IRQ_PORTC0 - src));
                else
                        return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL;

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

end of thread, other threads:[~2009-02-06 16:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27  8:44 [PATCH] powerpc/cpm2 Fix set interrupt type paulfax
2009-01-27 14:31 ` Kumar Gala
2009-01-27 18:14   ` Anton Vorontsov
2009-01-28  1:16     ` Kumar Gala
2009-01-28  2:05       ` paulfax
2009-02-06 16:44 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).