linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [NEWBIE] Interrupt-problem mpc5200
@ 2007-09-06 13:30 S. Fricke
  2007-09-11 12:41 ` S. Fricke
  0 siblings, 1 reply; 14+ messages in thread
From: S. Fricke @ 2007-09-06 13:30 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

Hello all.

What are the steps to configure an MPC500B-Board to react on an IRQ (2)?

I have written a test-driver with this code-snippets, but the prozessor
hangs when loading the driver.

my __init-function looks like:

static int __init mod_init( void ) 
{
    volatile static struct mpc52xx_intr __iomem *intr;
    u32 intr_ctrl;

    // ...

    printk( "intmod.ko: interrupt init ");
    if (request_irq(MPC52xx_IRQ2, intmod_isr, IRQF_SHARED , "intmod",
                INTMOD_IRQ_BOARD) == -EBUSY)
        printk("KO\n");
    else
        printk("OK\n");

    intr = ioremap(MPC52xx_MBAR+MPC52xx_INTR_OFFSET, MPC52xx_INTR_SIZE);

    // read - modify - write
    intr_ctrl = in_be32(&intr->ctrl);
    intr_ctrl &= 0xfff3ffff;
    intr_ctrl |= 0x00080200;
    out_be32(&intr->ctrl, intr_ctrl);       // ERROR!

    if(intr) iounmap(intr);

    // ...
}

On the Line, marked with "ERROR!" the prozessor hangs and the kernel drops
out.

TIA: 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 --]

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

end of thread, other threads:[~2007-09-19 14:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06 13:30 [NEWBIE] Interrupt-problem mpc5200 S. Fricke
2007-09-11 12:41 ` S. Fricke
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

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