IRQ2-4 number to use on mpc83xx?
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
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
Quoted 11 lines · Tjernlund
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
[email protected]
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
Quoted 15 lines · Andre Schwarz
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
Quoted 8 lines
Given this I can use this dts section for PCI devices connected @ IRQ0 and IRQ1
interrupt-map = <
0x58000 0 1 &ipic0x300x80x6000 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
Quoted 24 lines · Joakim Tjernlund
Quoted 19 lines · Andre Schwarz
I can only tell how I do on MPC834x :
=20
Table 8-6. IVEC/CVEC/MVEC Field Definition
=20
Interrupt ID Number Interrupt Meaning17 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 <0x58000 0 1 &ipic0x300x8Quoted 4 lines
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.
Quoted 4 lines
=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);
} elseWhat am I missing? Kernel is 2.6.25
Jocke
Quoted 18 lines · Joakim Tjernlund
Quoted 17 lines · Joakim Tjernlund
Quoted 13 lines · Andre Schwarz
I can only tell how I do on MPC834x :
=20
Table 8-6. IVEC/CVEC/MVEC Field Definition
=20
Interrupt ID Number Interrupt Meaning17 IRQ1 18 IRQ2 19 IRQ3 20 IRQ4 21 IRQ5 22 IRQ6 23 IRQ7 48 IRQ0Quoted 3 lines
=20
=20
Given this I can use this dts section for PCI devices connected @ IRQ=
0
Quoted 14 lines
Quoted 11 lines
Quoted 7 lines
and IRQ1
=20
interrupt-map =3D <0x58000 0 1 &ipic0x300x80x6000 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_FALLINGworks.
[SNIP]
Quoted 1 line
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