* IRQ2-4 number to use on mpc83xx?
@ 2008-09-22 22:32 Tjernlund
2008-09-23 9:08 ` Andre Schwarz
0 siblings, 1 reply; 5+ messages in thread
From: Tjernlund @ 2008-09-22 22:32 UTC (permalink / raw)
To: linuxppc-dev
I am trying to figure out what IRQ number I should use for
external IRQ pins IRQ2-4. Can somebody please drop me a note
on how the IRQ numbering works?
Jocke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IRQ2-4 number to use on mpc83xx?
2008-09-22 22:32 IRQ2-4 number to use on mpc83xx? Tjernlund
@ 2008-09-23 9:08 ` Andre Schwarz
2008-09-23 11:08 ` Joakim Tjernlund
0 siblings, 1 reply; 5+ messages in thread
From: Andre Schwarz @ 2008-09-23 9:08 UTC (permalink / raw)
To: Tjernlund; +Cc: linuxppc-dev
I can only tell how I do on MPC834x :
Table 8-6. IVEC/CVEC/MVEC Field Definition
Interrupt ID Number Interrupt Meaning
17 IRQ1
18 IRQ2
19 IRQ3
20 IRQ4
21 IRQ5
22 IRQ6
23 IRQ7
48 IRQ0
Given this I can use this dts section for PCI devices connected @ IRQ0
and IRQ1
interrupt-map = <0x5800 0 0 1 &ipic 0x30 0x8
0x6000 0 0 1 &ipic 0x11 0x8
0x6000 0 0 2 &ipic 0x11 0x8>;
You should be able to use IRQ-Nr 18-20 for IRQ2-4.
regards,
Andre
Tjernlund schrieb:
> I am trying to figure out what IRQ number I should use for
> external IRQ pins IRQ2-4. Can somebody please drop me a note
> on how the IRQ numbering works?
>
> Jocke
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IRQ2-4 number to use on mpc83xx?
2008-09-23 9:08 ` Andre Schwarz
@ 2008-09-23 11:08 ` Joakim Tjernlund
2008-09-23 20:18 ` Joakim Tjernlund
0 siblings, 1 reply; 5+ messages in thread
From: Joakim Tjernlund @ 2008-09-23 11:08 UTC (permalink / raw)
To: Andre Schwarz; +Cc: linuxppc-dev
On Tue, 2008-09-23 at 11:08 +0200, Andre Schwarz wrote:
> I can only tell how I do on MPC834x :
>
> Table 8-6. IVEC/CVEC/MVEC Field Definition
>
> Interrupt ID Number Interrupt Meaning
> 17 IRQ1
> 18 IRQ2
> 19 IRQ3
> 20 IRQ4
> 21 IRQ5
> 22 IRQ6
> 23 IRQ7
> 48 IRQ0
>
>
> Given this I can use this dts section for PCI devices connected @ IRQ0
> and IRQ1
>
> interrupt-map = <0x5800 0 0 1 &ipic 0x30 0x8
> 0x6000 0 0 1 &ipic 0x11 0x8
> 0x6000 0 0 2 &ipic 0x11 0x8>;
>
> You should be able to use IRQ-Nr 18-20 for IRQ2-4.
Yes, that makes sense. Thanks.
Jocke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IRQ2-4 number to use on mpc83xx?
2008-09-23 11:08 ` Joakim Tjernlund
@ 2008-09-23 20:18 ` Joakim Tjernlund
2008-09-24 7:16 ` Joakim Tjernlund
0 siblings, 1 reply; 5+ messages in thread
From: Joakim Tjernlund @ 2008-09-23 20:18 UTC (permalink / raw)
To: Andre Schwarz; +Cc: linuxppc-dev
On Tue, 2008-09-23 at 13:08 +0200, Joakim Tjernlund wrote:
> On Tue, 2008-09-23 at 11:08 +0200, Andre Schwarz wrote:
> > I can only tell how I do on MPC834x :
> >=20
> > Table 8-6. IVEC/CVEC/MVEC Field Definition
> >=20
> > Interrupt ID Number Interrupt Meaning
> > 17 IRQ1
> > 18 IRQ2
> > 19 IRQ3
> > 20 IRQ4
> > 21 IRQ5
> > 22 IRQ6
> > 23 IRQ7
> > 48 IRQ0
> >=20
> >=20
> > Given this I can use this dts section for PCI devices connected @ IRQ0
> > and IRQ1
> >=20
> > interrupt-map =3D <0x5800 0 0 1 &ipic 0x30 0x8
> > 0x6000 0 0 1 &ipic 0x11 0x8
> > 0x6000 0 0 2 &ipic 0x11 0x8>;
> >=20
> > You should be able to use IRQ-Nr 18-20 for IRQ2-4.
>=20
> Yes, that makes sense. Thanks.
>=20
> Jocke
OK, finally figured it out, see below, but I get a SEGV if I use=20
=EF=BB=BFIRQ_TYPE_EDGE_FALLING as below. IRQ_TYPE_EDGE_FALLING works.
info->irq =3D irq_create_mapping(NULL, 19); /* IRQ3 */
printk(KERN_ERR "IRQ map from %d to %ld\n", 19, info->irq);
info->irq_flags =3D IRQ_TYPE_EDGE_FALLING;
pdev =3D platform_device_register_simple("uio_irq", 3, r, 0);
if (IS_ERR(pdev)) {
ret =3D PTR_ERR(pdev);
printk("uio_irq: simple returned :%d\n", ret);
goto err_out;
}
if ((ret =3D uio_register_device(&pdev->dev, info))) {
printk("uio_register_device: returned :%d\n", ret);
goto err_out;
}
The SEGV is in kernel/irq/manage.c, around line 375. Both
desc->chip->enable and desc->chip->startup are NULL:
if (!(desc->status & IRQ_NOAUTOEN)) {
desc->depth =3D 0;
desc->status &=3D ~IRQ_DISABLED;
if (desc->chip->startup)
desc->chip->startup(irq);
else
desc->chip->enable(irq);
} else
What am I missing? Kernel is 2.6.25
Jocke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IRQ2-4 number to use on mpc83xx?
2008-09-23 20:18 ` Joakim Tjernlund
@ 2008-09-24 7:16 ` Joakim Tjernlund
0 siblings, 0 replies; 5+ messages in thread
From: Joakim Tjernlund @ 2008-09-24 7:16 UTC (permalink / raw)
To: Andre Schwarz; +Cc: linuxppc-dev
On Tue, 2008-09-23 at 22:18 +0200, Joakim Tjernlund wrote:
> On Tue, 2008-09-23 at 13:08 +0200, Joakim Tjernlund wrote:
> > On Tue, 2008-09-23 at 11:08 +0200, Andre Schwarz wrote:
> > > I can only tell how I do on MPC834x :
> > >=20
> > > Table 8-6. IVEC/CVEC/MVEC Field Definition
> > >=20
> > > Interrupt ID Number Interrupt Meaning
> > > 17 IRQ1
> > > 18 IRQ2
> > > 19 IRQ3
> > > 20 IRQ4
> > > 21 IRQ5
> > > 22 IRQ6
> > > 23 IRQ7
> > > 48 IRQ0
> > >=20
> > >=20
> > > Given this I can use this dts section for PCI devices connected @ IRQ=
0
> > > and IRQ1
> > >=20
> > > interrupt-map =3D <0x5800 0 0 1 &ipic 0x30 0x8
> > > 0x6000 0 0 1 &ipic 0x11 0x8
> > > 0x6000 0 0 2 &ipic 0x11 0x8>;
> > >=20
> > > You should be able to use IRQ-Nr 18-20 for IRQ2-4.
> >=20
> > Yes, that makes sense. Thanks.
> >=20
> > Jocke
>=20
> OK, finally figured it out, see below, but I get a SEGV if I use=20
> =EF=BB=BFIRQ_TYPE_EDGE_FALLING as below. IRQ_TYPE_EDGE_FALLING works.
[SNIP]
> What am I missing? Kernel is 2.6.25
I was missing a set_irq_type(info->irq, IRQ_TYPE_EDGE_FALLING)
Works now.
Jocke
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-09-24 7:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-22 22:32 IRQ2-4 number to use on mpc83xx? Tjernlund
2008-09-23 9:08 ` Andre Schwarz
2008-09-23 11:08 ` Joakim Tjernlund
2008-09-23 20:18 ` Joakim Tjernlund
2008-09-24 7:16 ` Joakim Tjernlund
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).