From: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
To: linuxppc-dev@ozlabs.org
Cc: nvbolhuis@aimvalley.nl
Subject: [PATCH] powerpc/ipic: support external edge triggered IRQ0
Date: Fri, 27 Nov 2009 11:02:40 +0100 [thread overview]
Message-ID: <200911271002.nARA2ekI017140@linpc062.aimsys.nl> (raw)
Currently an external edge triggered IRQ0 gives 2 problems.
It gives a sense error ("edge sense not supported on internal interrupts")
and it isn't acked.
This patch takes into account IRQ0 can be internal or external and fixes
both issues.
Signed-off-by: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
---
arch/powerpc/sysdev/ipic.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index cb7689c..3201db1 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -316,6 +316,7 @@ static struct ipic_info ipic_info[] = {
.prio_mask = 7,
},
[48] = {
+ .ack = IPIC_SEPNR,
.mask = IPIC_SEMSR,
.prio = IPIC_SMPRR_A,
.force = IPIC_SEFCR,
@@ -619,7 +620,9 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
return -EINVAL;
}
/* ipic supports only edge mode on external interrupts */
- if ((flow_type & IRQ_TYPE_EDGE_FALLING) && !ipic_info[src].ack) {
+ if ((flow_type & IRQ_TYPE_EDGE_FALLING) &&
+ ((src != IPIC_IRQ_EXT0 && !ipic_info[src].ack) ||
+ (src == IPIC_IRQ_EXT0 && (ipic_read(ipic->regs, IPIC_SEMSR) & SEMSR_SIRQ0)))) {
printk(KERN_ERR "ipic: edge sense not supported on internal "
"interrupts\n");
return -EINVAL;
--
1.5.2.2
reply other threads:[~2009-11-27 10:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200911271002.nARA2ekI017140@linpc062.aimsys.nl \
--to=nvbolhuis@aimvalley.nl \
--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