Re: interrupt number assignment dts file help

2009-01-14 Thread Kumar Gala


On Jan 14, 2009, at 11:15 PM, Ken Williams wrote:

I am trying to configure a dts file for the pci subsystem of a  
MPC8540 based system.


I am expecting (hoping) that the value specified in the interrupts  
property (98 in this example)
will be used as the virtual interrupt number and that I can later do  
a request_irq using that number.


The .dts deals with physical interrupt numbers.  Virtual IRQs is a  
linux concept.



kernel: 2.6.26.3

The board level configuration is:
 ADR29 connected to IDSEL
 using INTA# only
 The PCI interrupt is connected to external IRQ2

What I see is that inside irq_create_mapping, a call to  
irq_find_mapping produces a null virq,
so irq_alloc_virt is called and comes back with x12.  Can I assign  
the number to 98 (x62)

using the dts?  Any help would be greatly appreciated.


Do you want INTA# or the PCI error interrupt?

I'm guessing INT A#.

Here's an example from the mpc8540ads.dts:

pci0: p...@e0008000 {
cell-index = <0>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <
...
/* IDSEL 0x03 */
0x1800 0x0 0x0 0x1 &mpic 0x4 0x1
0x1800 0x0 0x0 0x2 &mpic 0x1 0x1
0x1800 0x0 0x0 0x3 &mpic 0x2 0x1
0x1800 0x0 0x0 0x4 &mpic 0x3 0x1


...

So the interrupt-map here deals w/PCI INTA# to INTD#.

(0x1800 0x0 0x0) (0x1) &mpic ((0x4) (0x1))
(pci address) (intA) pic-handle (pic HW IRQ) (irq sense info)

So to decode the example we have for IDSEL 0x03:
INTA: irq 4
INTB: irq 1
INTC: irq 2
INTD: irq 3

If you have a proper PCI driver in linux you shouldn't have to deal  
with virtual IRQs at all.


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


interrupt number assignment dts file help

2009-01-14 Thread Ken Williams
I am trying to configure a dts file for the pci subsystem of a MPC8540 based
system.

I am expecting (hoping) that the value specified in the interrupts property
(98 in this example)
will be used as the virtual interrupt number and that I can later do a
request_irq using that number.

kernel: 2.6.26.3

The board level configuration is:
 ADR29 connected to IDSEL
 using INTA# only
 The PCI interrupt is connected to external IRQ2

What I see is that inside irq_create_mapping, a call to irq_find_mapping
produces a null virq,
so irq_alloc_virt is called and comes back with x12.  Can I assign the
number to 98 (x62)
using the dts?  Any help would be greatly appreciated.

Thanks

Ken

pci0: p...@fdf08000 {
cell-index = <0>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <

/* IDSEL 0x1d */
0xe800 0x0 0x0 0x1 &mpic 0x2 0x1
>;
interrupt-parent = <&mpic>;
interrupts = <98 2>;
bus-range = <0 0>;
ranges = <0x200 0x0 0x8000 0x8000 0x0 0x2000
  0x100 0x0 0x0 0xe200 0x0 0x10>;
clock-frequency = <>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <0xfdf08000 0x1000>;
compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
device_type = "pci";
};
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev