linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: paulfax <paulfax@conspiracy.net>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc/cpm2 Fix set interrupt type
Date: Tue, 27 Jan 2009 02:44:07 -0600	[thread overview]
Message-ID: <497EC957.2050205@conspiracy.net> (raw)

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;

             reply	other threads:[~2009-01-27  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27  8:44 paulfax [this message]
2009-01-27 14:31 ` [PATCH] powerpc/cpm2 Fix set interrupt type 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497EC957.2050205@conspiracy.net \
    --to=paulfax@conspiracy.net \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).