Re: IRQ2-4 number to use on mpc83xx?
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 : > > > > > > 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 > > OK, finally figured it out, see below, but I get a SEGV if I use > IRQ_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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: IRQ2-4 number to use on mpc83xx?
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 : > > > > 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 OK, finally figured it out, see below, but I get a SEGV if I use IRQ_TYPE_EDGE_FALLING as below. IRQ_TYPE_EDGE_FALLING works. info->irq = irq_create_mapping(NULL, 19); /* IRQ3 */ printk(KERN_ERR "IRQ map from %d to %ld\n", 19, info->irq); info->irq_flags = IRQ_TYPE_EDGE_FALLING; pdev = platform_device_register_simple("uio_irq", 3, r, 0); if (IS_ERR(pdev)) { ret = PTR_ERR(pdev); printk("uio_irq: simple returned :%d\n", ret); goto err_out; } if ((ret = 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 = 0; desc->status &= ~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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: IRQ2-4 number to use on mpc83xx?
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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: IRQ2-4 number to use on mpc83xx?
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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev