linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* request_irq fails to get interrupt 12
@ 2007-10-22 16:47 Alan Bennett
  2007-10-22 17:21 ` S. Fricke
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Bennett @ 2007-10-22 16:47 UTC (permalink / raw)
  To: linuxppc-dev

Freescale experts.  Why on earth can't I request the IRQ for Timer1?

static int __init
dvr_ph_init(void)
{
	u32	rv;
	int k;
	//rv = driver_register(&dvr_ph_driver);
	for (k=0;k<64;k++) {
		rv = request_irq(k,dvrph_isr , 0, "dvr_ph", NULL);
		if (rv!=-38) printkplus("request_irq for %d returns %d", k,rv);
	}
	return rv;
}

Results in:
dvr_ph_init    145 - enter the routine
dvr_ph_init    155 -
dvr_ph_init    161 - request_irq for 16 returns -16  (vector 16 = TMCNT)
dvr_ph_init    161 - request_irq for 32 returns 0  (vector 32 = FCC1)
dvr_ph_init    161 - request_irq for 33 returns -16  (vector 33 = FCC2)
dvr_ph_init    161 - request_irq for 40 returns 0  (vector 40 = SCC1)
dvr_ph_init    161 - request_irq for 43 returns 0  (vector 43 = SCC4)

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: request_irq fails to get interrupt 12
@ 2007-10-22 19:55 Alan Bennett
  2007-10-22 20:33 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Bennett @ 2007-10-22 19:55 UTC (permalink / raw)
  To: linuxppc-dev

Ok, so what does it take to expose an interrupt vector on a pq2 PIC??
-Alan

Current:
        /
              localbus{
        ...
 	       fundevice1 {
		       interrupts = <c 8>;
		       interrupt-parent = <&PIC>;
	       };
          ...
               soc@e0000000 {
                      PIC: interrupt-controller@10c00 {
                          #interrupt-cells = <2>;
                          interrupt-controller;
                          reg = <10c00 80>;
                          compatible = "fsl,mpc8248-pic", "fsl,pq2-pic";
                        };
Is the above device tree enough on its own?
Do I have to write some platform code beyond:
  static void __init ep8248_pic_init(void)
  {
	struct device_node *np = of_find_compatible_node(NULL,   NULL, "fsl,pq2-pic");
	if (!np) {
		printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
		return;
	}

	cpm2_pic_init(np);
	of_node_put(np);
}

-Alan

Hello,

> Freescale experts.  Why on earth can't I request the IRQ for Timer1?

Please consule my question on [1] and the answers.

[1] http://ozlabs.org/pipermail/linuxppc-dev/2007-September/042061.html

bye
Silvio Fricke

--
-- S. Fricke ----------------------------- MAILTO:silvio.fricke@gmail.com --
   Diplom-Informatiker (FH)
   Linux-Entwicklung
----------------------------------------------------------------------------

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

end of thread, other threads:[~2007-10-22 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 16:47 request_irq fails to get interrupt 12 Alan Bennett
2007-10-22 17:21 ` S. Fricke
  -- strict thread matches above, loose matches on Subject: below --
2007-10-22 19:55 Alan Bennett
2007-10-22 20:33 ` Benjamin Herrenschmidt

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