* Device tree and /proc/iomem question
@ 2007-11-26 18:26 robert lazarski
2007-11-28 7:02 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: robert lazarski @ 2007-11-26 18:26 UTC (permalink / raw)
To: linuxppc-embedded
Hi all, I'm using a recent pull of the paulus tree 2.6.24RC2 on my
custom 85xx board. I'm trying to test my PCI1, PCI2 and PCIe . My
device tree for PCI is:
pci@8000 {
compatible = "fsl,mpc8540-pci";
device_type = "pci";
interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x11 J17 Slot 1 */
8800 0 0 1 &mpic 2 1
8800 0 0 2 &mpic 3 1
8800 0 0 3 &mpic 4 1
8800 0 0 4 &mpic 1 1
/* IDSEL 0x12 J16 Slot 2 */
9000 0 0 1 &mpic 3 1
9000 0 0 2 &mpic 4 1
9000 0 0 3 &mpic 2 1
9000 0 0 4 &mpic 1 1>;
interrupt-parent = <&mpic>;
interrupts = <18 2>;
bus-range = <0 ff>;
ranges = <02000000 0 80000000 80000000 0 20000000
01000000 0 00000000 e2000000 0 00100000>;
clock-frequency = <3f940aa>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <8000 1000>;
};
pci@c000 {
compatible = "fsl,mpc8540-pci";
device_type = "pci";
interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x11 J17 Slot 1 */
8800 0 0 1 &mpic 2 1
8800 0 0 2 &mpic 3 1
8800 0 0 3 &mpic 4 1
8800 0 0 4 &mpic 1 1
/* IDSEL 0x12 J16 Slot 2 */
9000 0 0 1 &mpic 3 1
9000 0 0 2 &mpic 4 1
9000 0 0 3 &mpic 2 1
9000 0 0 4 &mpic 1 1>;
interrupt-parent = <&mpic>;
interrupts = <18 2>;
bus-range = <0 ff>;
ranges = <02000000 0 c0000000 c0000000 0 20000000
01000000 0 00000000 e2800000 0 00100000>;
clock-frequency = <3f940aa>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <c000 1000>;
};
pcie@a000 {
compatible = "fsl,mpc8548-pcie";
device_type = "pci";
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <a000 1000>;
bus-range = <0 ff>;
ranges = <02000000 0 a0000000 a0000000 0 20000000
01000000 0 00000000 e3000000 0 00100000>;
clock-frequency = <1fca055>;
interrupt-parent = <&mpic>;
interrupts = <19 2>;
interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x0 */
0000 0 0 1 &mpic 0 1
0000 0 0 2 &mpic 1 1
0000 0 0 3 &mpic 2 1
0000 0 0 4 &mpic 3 1
>;
};
I see all the above in /proc/device-tree/soc8548@e0000000 when booting
the kernel. I double checked my memory mapping in u-boot and it
appears to match my device tree. Yet I don't see any pci here:
root:~> cat /proc/iomem
e0004500-e0004507 : serial
e0004600-e0004607 : serial
e0024000-e0024fff : ethernet
e0024520-e002453f : mdio
e0025000-e0025fff : ethernet
e0026000-e0026fff : ethernet
e0027000-e0027fff : ethernet
cat /proc/bus/pci/devices shows nothing though I have a card in PCI1,
and all I see from dmesg is "PCI: Probing PCI hardware" . Any ideas?
Robert
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Device tree and /proc/iomem question
2007-11-26 18:26 Device tree and /proc/iomem question robert lazarski
@ 2007-11-28 7:02 ` Kumar Gala
2007-11-28 21:45 ` robert lazarski
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2007-11-28 7:02 UTC (permalink / raw)
To: robert lazarski; +Cc: linuxppc-embedded
On Nov 26, 2007, at 12:26 PM, robert lazarski wrote:
> Hi all, I'm using a recent pull of the paulus tree 2.6.24RC2 on my
> custom 85xx board. I'm trying to test my PCI1, PCI2 and PCIe . My
> device tree for PCI is:
>
> pci@8000 {
> compatible = "fsl,mpc8540-pci";
> device_type = "pci";
> interrupt-map-mask = <f800 0 0 7>;
> interrupt-map = <
>
> /* IDSEL 0x11 J17 Slot 1 */
> 8800 0 0 1 &mpic 2 1
> 8800 0 0 2 &mpic 3 1
> 8800 0 0 3 &mpic 4 1
> 8800 0 0 4 &mpic 1 1
>
> /* IDSEL 0x12 J16 Slot 2 */
>
> 9000 0 0 1 &mpic 3 1
> 9000 0 0 2 &mpic 4 1
> 9000 0 0 3 &mpic 2 1
> 9000 0 0 4 &mpic 1 1>;
>
> interrupt-parent = <&mpic>;
> interrupts = <18 2>;
> bus-range = <0 ff>;
> ranges = <02000000 0 80000000 80000000 0 20000000
> 01000000 0 00000000 e2000000 0 00100000>;
> clock-frequency = <3f940aa>;
> #interrupt-cells = <1>;
> #size-cells = <2>;
> #address-cells = <3>;
> reg = <8000 1000>;
> };
>
> pci@c000 {
> compatible = "fsl,mpc8540-pci";
> device_type = "pci";
> interrupt-map-mask = <f800 0 0 7>;
> interrupt-map = <
>
> /* IDSEL 0x11 J17 Slot 1 */
> 8800 0 0 1 &mpic 2 1
> 8800 0 0 2 &mpic 3 1
> 8800 0 0 3 &mpic 4 1
> 8800 0 0 4 &mpic 1 1
>
> /* IDSEL 0x12 J16 Slot 2 */
>
> 9000 0 0 1 &mpic 3 1
> 9000 0 0 2 &mpic 4 1
> 9000 0 0 3 &mpic 2 1
> 9000 0 0 4 &mpic 1 1>;
>
> interrupt-parent = <&mpic>;
> interrupts = <18 2>;
> bus-range = <0 ff>;
> ranges = <02000000 0 c0000000 c0000000 0 20000000
> 01000000 0 00000000 e2800000 0 00100000>;
> clock-frequency = <3f940aa>;
> #interrupt-cells = <1>;
> #size-cells = <2>;
> #address-cells = <3>;
> reg = <c000 1000>;
> };
>
> pcie@a000 {
> compatible = "fsl,mpc8548-pcie";
> device_type = "pci";
> #interrupt-cells = <1>;
> #size-cells = <2>;
> #address-cells = <3>;
> reg = <a000 1000>;
> bus-range = <0 ff>;
> ranges = <02000000 0 a0000000 a0000000 0 20000000
> 01000000 0 00000000 e3000000 0 00100000>;
> clock-frequency = <1fca055>;
> interrupt-parent = <&mpic>;
> interrupts = <19 2>;
> interrupt-map-mask = <f800 0 0 7>;
> interrupt-map = <
> /* IDSEL 0x0 */
> 0000 0 0 1 &mpic 0 1
> 0000 0 0 2 &mpic 1 1
> 0000 0 0 3 &mpic 2 1
> 0000 0 0 4 &mpic 3 1
> >;
> };
Take a look at the device trees in the kernel source. You'll see we
moved PCI around so its at the root level. Not sure if that's your
issue.
> I see all the above in /proc/device-tree/soc8548@e0000000 when booting
> the kernel. I double checked my memory mapping in u-boot and it
> appears to match my device tree. Yet I don't see any pci here:
>
> root:~> cat /proc/iomem
> e0004500-e0004507 : serial
> e0004600-e0004607 : serial
> e0024000-e0024fff : ethernet
> e0024520-e002453f : mdio
> e0025000-e0025fff : ethernet
> e0026000-e0026fff : ethernet
> e0027000-e0027fff : ethernet
>
> cat /proc/bus/pci/devices shows nothing though I have a card in PCI1,
> and all I see from dmesg is "PCI: Probing PCI hardware" . Any ideas?
It seems like its not even really probing or finding the buses.
Can you post what your board/platform code looks like?
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Device tree and /proc/iomem question
2007-11-28 7:02 ` Kumar Gala
@ 2007-11-28 21:45 ` robert lazarski
0 siblings, 0 replies; 3+ messages in thread
From: robert lazarski @ 2007-11-28 21:45 UTC (permalink / raw)
Cc: linuxppc-embedded
On Nov 28, 2007 2:02 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
> Take a look at the device trees in the kernel source. You'll see we
> moved PCI around so its at the root level. Not sure if that's your
> issue.
>
> > I see all the above in /proc/device-tree/soc8548@e0000000 when booting
> > the kernel. I double checked my memory mapping in u-boot and it
> > appears to match my device tree. Yet I don't see any pci here:
> >
> > root:~> cat /proc/iomem
> > e0004500-e0004507 : serial
> > e0004600-e0004607 : serial
> > e0024000-e0024fff : ethernet
> > e0024520-e002453f : mdio
> > e0025000-e0025fff : ethernet
> > e0026000-e0026fff : ethernet
> > e0027000-e0027fff : ethernet
> >
> > cat /proc/bus/pci/devices shows nothing though I have a card in PCI1,
> > and all I see from dmesg is "PCI: Probing PCI hardware" . Any ideas?
>
> It seems like its not even really probing or finding the buses.
>
> Can you post what your board/platform code looks like?
>
> - k
>
Indeed, for 2.6.24RC2 I had to move PCI to the root level and I also
had some problems in my board/platform code. I still seem to have
problems though - I have a common intel pro 100 card in PCI1 that
doesn't seem to be detected. Here's what I have now:
bash-3.00# lspci -v
00:00.0 Class 0b20: 1057:0012 (rev 20)
Flags: bus master, 66Mhz, fast devsel, latency 128, IRQ 19
Memory at <unassigned> (32-bit, prefetchable)
Memory at <unassigned> (64-bit, non-prefetchable)
Memory at <unassigned> (64-bit, non-prefetchable)
Capabilities: [60] #00 [0000]
I need to run the bus at 33MHZ. The devices seem to mapped correctly now:
bash-3.00# cat /proc/iomem
80000000-9fffffff : /pci@e0008000
a0000000-bfffffff : /pcie@e000a000
c0000000-dfffffff : /pci@e000c000
e0004500-e0004507 : serial
e0004600-e0004607 : serial
e0024000-e0024fff : ethernet
e0024520-e002453f : mdio
e0025000-e0025fff : ethernet
e0026000-e0026fff : ethernet
e0027000-e0027fff : ethernet
bash-3.00# cat /proc/ioports
00000000-000fffff : /pci@e0008000
feefc000-ffefbfff : /pcie@e000a000
ffefe000-ffffdfff : /pci@e000c000
This is a custom 8548 board we are trying to bring PCI up on and I'm
not sure if the hardware has issues, or my code is the issue. Here's
my current PCI tree which is now at the root level. My u-boot memory
map matches this AFAICT. Any further ideas greatly appreciated:
pci@e0008000 {
interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x11 J17 Slot 1 */
8800 0 0 1 &mpic 2 1
8800 0 0 2 &mpic 3 1
8800 0 0 3 &mpic 4 1
8800 0 0 4 &mpic 1 1
/* IDSEL 0x12 J16 Slot 2 */
9000 0 0 1 &mpic 3 1
9000 0 0 2 &mpic 4 1
9000 0 0 3 &mpic 2 1
9000 0 0 4 &mpic 1 1>;
interrupt-parent = <&mpic>;
interrupts = <18 2>;
bus-range = <0 ff>;
ranges = <02000000 0 80000000 80000000 0 20000000
01000000 0 00000000 e2000000 0 00100000>;
clock-frequency = <1fca055>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <e0008000 1000>;
compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
device_type = "pci";
};
pci@e000c000 {
interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x11 J17 Slot 1 */
8800 0 0 1 &mpic 2 1
8800 0 0 2 &mpic 3 1
8800 0 0 3 &mpic 4 1
8800 0 0 4 &mpic 1 1
/* IDSEL 0x12 J16 Slot 2 */
9000 0 0 1 &mpic 3 1
9000 0 0 2 &mpic 4 1
9000 0 0 3 &mpic 2 1
9000 0 0 4 &mpic 1 1>;
interrupt-parent = <&mpic>;
interrupts = <18 2>;
bus-range = <0 ff>;
ranges = <02000000 0 c0000000 c0000000 0 20000000
01000000 0 00000000 e2800000 0 00100000>;
clock-frequency = <1fca055>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <e000c000 1000>;
compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
device_type = "pci";
};
pcie@e000a000 {
interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x0 (PEX) */
00000 0 0 1 &mpic 0 1
00000 0 0 2 &mpic 1 1
00000 0 0 3 &mpic 2 1
00000 0 0 4 &mpic 3 1>;
interrupt-parent = <&mpic>;
interrupts = <1a 2>;
bus-range = <0 ff>;
ranges = <02000000 0 a0000000 a0000000 0 20000000
01000000 0 00000000 e3000000 0 08000000>;
clock-frequency = <1fca055>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <e000a000 1000>;
compatible = "fsl,mpc8548-pcie";
device_type = "pci";
pcie@0 {
reg = <0 0 0 0 0>;
#size-cells = <2>;
#address-cells = <3>;
device_type = "pci";
ranges = <02000000 0 a0000000
02000000 0 a0000000
0 20000000
01000000 0 00000000
01000000 0 00000000
0 08000000>;
};
};
Thanks!
Robert
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-28 21:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-26 18:26 Device tree and /proc/iomem question robert lazarski
2007-11-28 7:02 ` Kumar Gala
2007-11-28 21:45 ` robert lazarski
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).