* Device tree and IRQ for chip on PCI
@ 2008-11-17 15:12 Matteo Fortini
2008-11-18 5:49 ` Matthias Fuchs
0 siblings, 1 reply; 3+ messages in thread
From: Matteo Fortini @ 2008-11-17 15:12 UTC (permalink / raw)
To: linuxppc-embedded
I have a chip connected on the PCI bus on an MPC512x, but if I get the
IRQ property from the PCI chip, it is not set up by Linux.
The IRQ line goes directly from the chip to the MPC512x uc, so I don't
know if I should create a separate node just to get the interrupt, or I
should expect the pci functions to assign it an interrupt based on the
PCI bus.
The description for the PCI bus is like this:
pci: pci@80008500 {
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <
// IDSEL 0x15 - Slot PCI
0xa800 0x0 0x0 0x1 &ipic 0x0 0x8
0xa800 0x0 0x0 0x2 &ipic 0x1 0x8
0xa800 0x0 0x0 0x3 &ipic 0x2 0x8
0xa800 0x0 0x0 0x4 &ipic 0x3 0x8
>;
interrupt-parent = < &ipic >;
interrupts = <17 0x8>;
bus-range = <0 0>;
ranges = <0x42000000 0x0 0xa0000000 0xa0000000 0x0
0x10000000
0x02000000 0x0 0xb0000000 0xb0000000 0x0
0x10000000
0x01000000 0x0 0x00000000 0x84000000 0x0
0x01000000>;
clock-frequency = <66000000>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <0x80008500 0x100>;
compatible = "fsl,mpc5121-pci";
device_type = "pci";
};
Thanks,
Matteo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Device tree and IRQ for chip on PCI
2008-11-17 15:12 Device tree and IRQ for chip on PCI Matteo Fortini
@ 2008-11-18 5:49 ` Matthias Fuchs
2008-11-19 15:29 ` Matteo Fortini
0 siblings, 1 reply; 3+ messages in thread
From: Matthias Fuchs @ 2008-11-18 5:49 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Matteo Fortini
Hi Matteo,
> I have a chip connected on the PCI bus on an MPC512x, but if I get the
> IRQ property from the PCI chip, it is not set up by Linux.
It's not clear to me what you mean by this.
Do you see an interrupt assigned to your pci device's PCI_INTERRUPT_LINE
register? Check lspci output.
> The IRQ line goes directly from the chip to the MPC512x uc, so I don't
> know if I should create a separate node just to get the interrupt, or I
No. The pci node in the DT should be ok.
Because you posted to an embedded list, I need to ask this: are you using a
custom hardware? Does the DT fit to your board's interrupt / IDSEL routing?
Matthias
> should expect the pci functions to assign it an interrupt based on the
> PCI bus.
>
> The description for the PCI bus is like this:
> pci: pci@80008500 {
> interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
> interrupt-map = <
> // IDSEL 0x15 - Slot PCI
> 0xa800 0x0 0x0 0x1 &ipic 0x0 0x8
> 0xa800 0x0 0x0 0x2 &ipic 0x1 0x8
> 0xa800 0x0 0x0 0x3 &ipic 0x2 0x8
> 0xa800 0x0 0x0 0x4 &ipic 0x3 0x8
>
> >;
>
> interrupt-parent = < &ipic >;
> interrupts = <17 0x8>;
> bus-range = <0 0>;
> ranges = <0x42000000 0x0 0xa0000000 0xa0000000 0x0
> 0x10000000
> 0x02000000 0x0 0xb0000000 0xb0000000 0x0
> 0x10000000
> 0x01000000 0x0 0x00000000 0x84000000 0x0
> 0x01000000>;
> clock-frequency = <66000000>;
> #interrupt-cells = <1>;
> #size-cells = <2>;
> #address-cells = <3>;
> reg = <0x80008500 0x100>;
> compatible = "fsl,mpc5121-pci";
> device_type = "pci";
> };
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Device tree and IRQ for chip on PCI
2008-11-18 5:49 ` Matthias Fuchs
@ 2008-11-19 15:29 ` Matteo Fortini
0 siblings, 0 replies; 3+ messages in thread
From: Matteo Fortini @ 2008-11-19 15:29 UTC (permalink / raw)
To: Matthias Fuchs; +Cc: linuxppc-embedded
The lspci output gives me the same IRQ for both the PCI bus and the
peripheral attached to it. I don't know why the pci_get_config_byte call
was returning me 0x00, I'll check into it.
Regarding the DT, it should be ok, at least the IDSEL is 0x15, but if
you have any specific documentation I can take a look at, I will recheck it.
Thanks,
Matteo
Matthias Fuchs ha scritto:
> Hi Matteo,
>
>
>> I have a chip connected on the PCI bus on an MPC512x, but if I get the
>> IRQ property from the PCI chip, it is not set up by Linux.
>>
> It's not clear to me what you mean by this.
> Do you see an interrupt assigned to your pci device's PCI_INTERRUPT_LINE
> register? Check lspci output.
>
>
>> The IRQ line goes directly from the chip to the MPC512x uc, so I don't
>> know if I should create a separate node just to get the interrupt, or I
>>
> No. The pci node in the DT should be ok.
> Because you posted to an embedded list, I need to ask this: are you using a
> custom hardware? Does the DT fit to your board's interrupt / IDSEL routing?
>
> Matthias
>
>
>> should expect the pci functions to assign it an interrupt based on the
>> PCI bus.
>>
>> The description for the PCI bus is like this:
>> pci: pci@80008500 {
>> interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
>> interrupt-map = <
>> // IDSEL 0x15 - Slot PCI
>> 0xa800 0x0 0x0 0x1 &ipic 0x0 0x8
>> 0xa800 0x0 0x0 0x2 &ipic 0x1 0x8
>> 0xa800 0x0 0x0 0x3 &ipic 0x2 0x8
>> 0xa800 0x0 0x0 0x4 &ipic 0x3 0x8
>>
>> >;
>>
>> interrupt-parent = < &ipic >;
>> interrupts = <17 0x8>;
>> bus-range = <0 0>;
>> ranges = <0x42000000 0x0 0xa0000000 0xa0000000 0x0
>> 0x10000000
>> 0x02000000 0x0 0xb0000000 0xb0000000 0x0
>> 0x10000000
>> 0x01000000 0x0 0x00000000 0x84000000 0x0
>> 0x01000000>;
>> clock-frequency = <66000000>;
>> #interrupt-cells = <1>;
>> #size-cells = <2>;
>> #address-cells = <3>;
>> reg = <0x80008500 0x100>;
>> compatible = "fsl,mpc5121-pci";
>> device_type = "pci";
>> };
>>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
--
Ing. Matteo Fortini, PhD
Digitek spa
Embedded Linux specialist
V. Romagnoli, 24
41033 Concordia (MO)
Italy
Tel : (+39) 0535-56942
Fax : (+39) 0535-54550
Skype: callto://matteofortini
eMail: m.fortini@selcomgroup.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-19 15:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 15:12 Device tree and IRQ for chip on PCI Matteo Fortini
2008-11-18 5:49 ` Matthias Fuchs
2008-11-19 15:29 ` Matteo Fortini
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).