From: "S. Fricke" <silvio.fricke@googlemail.com>
To: linuxppc-dev@ozlabs.org
Subject: Re: [NEWBIE] Interrupt-problem mpc5200
Date: Tue, 11 Sep 2007 14:41:54 +0200 [thread overview]
Message-ID: <20070911124154.GI11807@sfrouter> (raw)
In-Reply-To: <20070906133050.GE11807@sfrouter>
[-- Attachment #1: Type: text/plain, Size: 2635 bytes --]
Dear Linux-enthusiasts,
I'm still at the same problem.
I have now implemented a irq_chip for the hardwired IRQ2. Now I have:
--==>
volatile static struct mpc52xx_intr __iomem *intr;
unsigned long flags;
static DEFINE_SPINLOCK(my_irq_controller_lock);
/*
* HELPER-Function
*/
static inline void io_be_setbit(u32 __iomem *addr, int bitno)
{
out_be32(addr, in_be32(addr) | (1 << bitno));
}
static inline void io_be_clrbit(u32 __iomem *addr, int bitno)
{
out_be32(addr, in_be32(addr) & ~(1 << bitno));
}
/*
* IRQ-Zeugs
*/
static void my_irq_ack(unsigned int irq)
{
printk("%s(%s/%d):\n", __FILE__, __FUNCTION__, __LINE__);
spin_lock_irqsave(&my_irq_controller_lock, flags);
if(intr)
io_be_setbit(&intr->ctrl, 25);
spin_unlock_irqrestore(&my_irq_controller_lock, flags);
printk("%s(%s/%d):\n", __FILE__, __FUNCTION__, __LINE__);
}
/* irq - disabled */
static void my_irq_mask(unsigned int irq)
{
printk("%s(%s/%d):\n", __FILE__, __FUNCTION__, __LINE__);
spin_lock_irqsave(&my_irq_controller_lock, flags);
if(intr)
io_be_clrbit(&intr->ctrl, 9);
spin_unlock_irqrestore(&my_irq_controller_lock, flags);
printk("%s(%s/%d):\n", __FILE__, __FUNCTION__, __LINE__);
}
/* irq - enable */
static void my_irq_unmask(unsigned int irq)
{
printk("%s(%s/%d):\n", __FILE__, __FUNCTION__, __LINE__);
spin_lock_irqsave(&my_irq_controller_lock, flags);
if(intr)
io_be_setbit(&intr->ctrl, 9);
spin_unlock_irqrestore(&my_irq_controller_lock, flags);
printk("%s(%s/%d):\n", __FILE__, __FUNCTION__, __LINE__);
}
static struct irq_chip my_irq_chip = {
.typename = "MY_IRQ_TEST",
.ack = my_irq_ack,
.mask = my_irq_mask,
.unmask = my_irq_unmask,
};
static int __init mod_init( void )
{
// ...
intr = mpc52xx_find_and_map("mpc52xx-pic");
if(!intr) {
panic(__FILE__ ": mpc52xx-pic - MAP failed");
}
set_irq_chip(MPC52xx_IRQ2, &my_irq_chip);
a = request_irq(2, intmod_isr, IRQF_DISABLED , "intmod", INTMOD_IRQ_BOARD);
printk("a: 0x%08x\n", a);
// ...
}
<==--
Now my code hangs on the my_irq_unmask(...)-function on "io_be_setbit". Why?
Can anyone help me, or point me to the right newsgroup/forum?
So long!
Silvio
--
-- S. Fricke ----------------------------- MAILTO:silvio.fricke@gmail.com --
Diplom-Informatiker (FH)
Linux-Entwicklung JABBER: fricke@jabber.org
----------------------------------------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-09-11 12:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 13:30 [NEWBIE] Interrupt-problem mpc5200 S. Fricke
2007-09-11 12:41 ` S. Fricke [this message]
2007-09-11 14:19 ` Grant Likely
2007-09-11 18:28 ` S. Fricke
2007-09-11 19:05 ` Grant Likely
2007-09-12 18:30 ` S. Fricke
2007-09-12 19:29 ` Grant Likely
2007-09-19 7:16 ` S. Fricke
2007-09-19 14:31 ` Grant Likely
2007-09-14 13:29 ` Matt Sealey
2007-09-14 14:53 ` Grant Likely
2007-09-14 15:18 ` Matt Sealey
2007-09-14 15:49 ` Grant Likely
2007-09-14 16:04 ` Matt Sealey
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=20070911124154.GI11807@sfrouter \
--to=silvio.fricke@googlemail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=silvio.fricke@gmail.com \
/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).