From: "Anand Mistry" <anand.mistry@Spectross.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: PCI-PCI bridge configuration in linux device tree
Date: Sat, 15 Feb 2014 18:03:29 +0530 [thread overview]
Message-ID: <20140215115045.M44796@Spectross.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]
Hello,
We are working on a cPCI based application involving MPC8313 processor. The
cPCI back-plane has a PCI-PCI bridge on it.
While booting, the linux kernel(2.6.23) crashes while allocating resources for
devices
beyong the bridge. After examination we came to know that if we program the
PCI-PCI bridge's memory windows in u-boot (memory base and limit registers
manually using u-boot commands), the kernel won't crash and allocate resources.
Our understanding is that programming of PCI-PCI bridges's memory windows
should be done automatically either by u-boot or by linux during boot (not
considering hot-swap right now) and no special driver is required for PCI-PCI
bridges.
Is our understanding correct? Can somebody help us find out the way to achieve
automatic configuration of PCI-PCI bridge memory windows for resource allocation?
Attachments,
log_pci_bridge.txt : kernel crash log
pci_dts.txt : PCI config part of the DTS file
Thanks and Regards,
Anand Mistry,
Spectross Digital Systems, New Delhi
[-- Attachment #2: pci_dts.txt --]
[-- Type: text/plain, Size: 895 bytes --]
pci@8500 { // sds-am : controller card config only
bus-range = <0 0>;
ranges = <02000000 0 90000000 90000000 0 10000000
42000000 0 80000000 80000000 0 10000000
01000000 0 00000000 e2000000 0 00100000>;
clock-frequency = <3f940aa>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <8500 100>;
compatible = "fsl,mpc8349-pci";
device_type = "pci";
interrupt-parent = < &ipic >;
interrupts = <42 8>;
interrupt-map-mask = <0F800 0 0 7>;
interrupt-map = <
// ** For reference **
// INTA = IRQ1 = 0x11
// INTB = IRQ2 = 0x12
// INTC = IRQ0 = 0x30
// INTD = IRQ4 = 0x14
// BUS 0 IDSEL 0x18 (IDSEL = AD24)
0c000 0 0 1 &ipic 11 8 // PCI_INTA
0c000 0 0 2 &ipic 12 8 // PCI_INTB slot 13 i guess
0c000 0 0 3 &ipic 30 8 // PCI_INTC slot 14 i guess
0c000 0 0 4 &ipic 14 8 // PCI_INTD slot 15 i guess
>;
};
[-- Attachment #3: log_pci_bridge.txt --]
[-- Type: text/plain, Size: 10346 bytes --]
Booting using the fdt at 0x400000
[ 0.000000] -> early_init_devtree(c0400000)
[ 0.000000] search "chosen", depth: 0, uname:
[ 0.000000] search "chosen", depth: 1, uname: chosen
[ 0.000000] Looking for initrd properties... <3>initrd_start=0x0 initrd_end=0x0
[ 0.000000] Command line is: root=/dev/nfs rw nfsroot=192.168.1.11:/nfs/rootfs/fce_test ip=192.168.1.111:192.168.1.11:192.168.1.1:255.255.255.0:mpc8313erdb:eth0:off panic=1 loglevel=7
[ 0.000000] dt_root_size_cells = 1
[ 0.000000] dt_root_addr_cells = 1
[ 0.000000] memory scan node memory, reg size 8, data: 0 10000000 2 1,
[ 0.000000] - 0 , 10000000
[ 0.000000] Phys. mem: 10000000
[ 0.000000] -> move_device_tree
[ 0.000000] <- move_device_tree
[ 0.000000] Scanning CPUs ...
[ 0.000000] boot cpu: logical 0 physical 0
[ 0.000000] <- early_init_devtree()
[ 0.000000] Using MPC8313 RDB machine description
[ 0.000000] Linux version 2.6.23-gd2c719c0-dirty (anand@anand-desktop) (gcc version 4.2.2) #32 Wed Feb 5 18:50:03 IST 2014
[ 0.000000] -> unflatten_device_tree()
[ 0.000000] size is f44, allocating...
[ 0.000000] unflattening cffff0b8...
[ 0.000000] fixed up name for ->
[ 0.000000] fixed up name for chosen -> chosen
[ 0.000000] fixed up name for cpus -> cpus
[ 0.000000] fixed up name for PowerPC,8313@0 -> PowerPC,8313
[ 0.000000] fixed up name for memory -> memory
[ 0.000000] fixed up name for nand@e2800000 -> nand
[ 0.000000] fixed up name for soc8313@e0000000 -> soc8313
[ 0.000000] fixed up name for wdt@200 -> wdt
[ 0.000000] fixed up name for usb@23000 -> usb
[ 0.000000] fixed up name for mdio@24520 -> mdio
[ 0.000000] fixed up name for ethernet-phy@1 -> ethernet-phy
[ 0.000000] fixed up name for ptimer@24e00 -> ptimer
[ 0.000000] fixed up name for ethernet@24000 -> ethernet
[ 0.000000] fixed up name for serial@4500 -> serial
[ 0.000000] fixed up name for pci@8500 -> pci
[ 0.000000] fixed up name for pic@700 -> pic
[ 0.000000] fixed up name for elbc@5000 -> elbc
[ 0.000000] fixed up name for power@b00 -> power
[ 0.000000] fixed up name for timer@500 -> timer
[ 0.000000] <- unflatten_device_tree()
[ 0.000000] console [udbg0] enabled
setup_arch: bootmem
mpc8313_rdb_setup_arch()
[ 0.000000] Found MPC83xx PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->2
[ 0.000000] PCI: MEM[0] 0x90000000 -> 0x9fffffff
[ 0.000000] PCI: MEM[1] 0x80000000 -> 0x8fffffff
[ 0.000000] PCI: IO 0x0 -> 0xfffff
arch: exit
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0 -> 65536
[ 0.000000] Normal 65536 -> 65536
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0 -> 65536
[ 0.000000] Built 1 zonelists in Zone order. Total pages: 65024
[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.11:/nfs/rootfs/fce_test ip=192.168.1.111:192.168.1.11:192.168.1.1:255.255.255.0:mpc8313erdb:eth0:off panic=1 loglevel=7
[ 0.000000] IPIC (128 IRQ sources) at fdef9700
[ 0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)
[ 0.001092] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.009919] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.049138] Memory: 256256k/262144k available (3112k kernel code, 5644k reserved, 140k data, 93k bss, 152k init)
[ 0.144303] Mount-cache hash table entries: 512
[ 0.152429] NET: Registered protocol family 16
[ 0.159856] of_irq_map_raw: par=/soc8313@e0000000/pic@700,intspec=[0x00000026 0x00000008...],ointsize=2
[ 0.169145] of_irq_map_raw: ipar=/soc8313@e0000000/pic@700, size=2
[ 0.175221] -> addrsize=0
[ 0.177893] -> got it !, intspec=26
[ 0.181573] #### arch/powerpc/kernel/prom_parse.c:1049 irq=38
[ 0.187501] of_irq_map_raw: par=/soc8313@e0000000/pic@700,intspec=[0x00000020 0x00000008...],ointsize=2
[ 0.196764] of_irq_map_raw: ipar=/soc8313@e0000000/pic@700, size=2
[ 0.202859] -> addrsize=0
[ 0.205537] -> got it !, intspec=20
[ 0.209211] #### arch/powerpc/kernel/prom_parse.c:1049 irq=32
[ 0.214894] of_irq_map_raw: par=/soc8313@e0000000/pic@700,intspec=[0x00000021 0x00000008...],ointsize=2
[ 0.224221] of_irq_map_raw: ipar=/soc8313@e0000000/pic@700, size=2
[ 0.230334] -> addrsize=0
[ 0.233012] -> got it !, intspec=21
[ 0.236679] #### arch/powerpc/kernel/prom_parse.c:1049 irq=33
[ 0.242368] of_irq_map_raw: par=/soc8313@e0000000/pic@700,intspec=[0x00000022 0x00000008...],ointsize=2
[ 0.251689] of_irq_map_raw: ipar=/soc8313@e0000000/pic@700, size=2
[ 0.257817] -> addrsize=0
[ 0.260487] -> got it !, intspec=22
[ 0.264153] #### arch/powerpc/kernel/prom_parse.c:1049 irq=34
[ 0.270088] of_irq_map_raw: par=/soc8313@e0000000/pic@700,intspec=[0x00000014 0x00000008...],ointsize=2
[ 0.279342] of_irq_map_raw: ipar=/soc8313@e0000000/pic@700, size=2
[ 0.285452] -> addrsize=0
[ 0.288123] -> got it !, intspec=14
[ 0.291868] of_irq_map_raw: par=/soc8313@e0000000/pic@700,intspec=[0x0000004d 0x00000008...],ointsize=2
[ 0.301125] of_irq_map_raw: ipar=/soc8313@e0000000/pic@700, size=2
[ 0.307220] -> addrsize=0
[ 0.309899] -> got it !, intspec=4d
[ 0.313823] PCI: Probing PCI hardware
[ 0.317924] pci_busdev_to_OF_node(0,0xc0)
[ 0.321801] scan_OF_for_pci_bus
[ 0.324934] parent is /soc8313@e0000000/pci@8500
[ 0.329561] scan_OF_for_pci_dev, devfn = c0
[ 0.333700] not found
[ 0.335923] result is <NULL>
[ 0.339565] pci_busdev_to_OF_node(1,0x48)
[ 0.343441] scan_OF_for_pci_bus
[ 0.346543] scan_OF_for_pci_bus
[ 0.349646] scan_OF_for_pci_dev, devfn = c0
[ 0.353786] not found
[ 0.356032] no parent found
[ 0.358867] pci_busdev_to_OF_node(1,0x58)
[ 0.362860] scan_OF_for_pci_bus
[ 0.365967] scan_OF_for_pci_bus
[ 0.369080] scan_OF_for_pci_dev, devfn = c0
[ 0.373225] not found
[ 0.375447] no parent found
[ 0.378329] pci_busdev_to_OF_node(0,0xc0)
[ 0.382299] scan_OF_for_pci_bus
[ 0.385409] parent is /soc8313@e0000000/pci@8500
[ 0.390075] scan_OF_for_pci_dev, devfn = c0
[ 0.394220] not found
[ 0.396469] result is <NULL>
[ 0.399388] of_irq_map_raw: par=/soc8313@e0000000/pci@8500,intspec=[0x00000004 0x0000c000...],ointsize=1
[ 0.408846] of_irq_map_raw: ipar=/soc8313@e0000000/pci@8500, size=1
[ 0.415048] -> addrsize=3
[ 0.417735] -> match=0 (imaplen=24)
[ 0.421277] -> newintsize=2, newaddrsize=0
[ 0.425412] -> imaplen=21
[ 0.428092] -> match=0 (imaplen=17)
[ 0.431612] -> newintsize=2, newaddrsize=0
[ 0.435780] -> imaplen=14
[ 0.438460] -> match=0 (imaplen=10)
[ 0.442006] -> newintsize=2, newaddrsize=0
[ 0.446148] -> imaplen=7
[ 0.448742] -> match=1 (imaplen=3)
[ 0.452201] -> newintsize=2, newaddrsize=0
[ 0.456342] -> imaplen=0
[ 0.458912] -> new parent: /soc8313@e0000000/pic@700
[ 0.463949] -> got it !, intspec=14
[ 0.468294] pci_busdev_to_OF_node(2,0x60)
[ 0.472182] scan_OF_for_pci_bus
[ 0.475231] scan_OF_for_pci_bus
[ 0.478370] scan_OF_for_pci_bus
[ 0.481479] scan_OF_for_pci_dev, devfn = c0
[ 0.485625] not found
[ 0.487847] no parent found
[ 0.490730] pci_busdev_to_OF_node(1,0x48)
[ 0.494698] scan_OF_for_pci_bus
[ 0.497806] scan_OF_for_pci_bus
[ 0.500919] scan_OF_for_pci_dev, devfn = c0
[ 0.505064] not found
[ 0.507286] no parent found
[ 0.510165] pci_busdev_to_OF_node(0,0xc0)
[ 0.514136] scan_OF_for_pci_bus
[ 0.517248] parent is /soc8313@e0000000/pci@8500
[ 0.521914] scan_OF_for_pci_dev, devfn = c0
[ 0.526059] not found
[ 0.528307] result is <NULL>
[ 0.531226] of_irq_map_raw: par=/soc8313@e0000000/pci@8500,intspec=[0x00000002 0x0000c000...],ointsize=1
[ 0.540685] of_irq_map_raw: ipar=/soc8313@e0000000/pci@8500, size=1
[ 0.546887] -> addrsize=3
[ 0.549574] -> match=0 (imaplen=24)
[ 0.553115] -> newintsize=2, newaddrsize=0
[ 0.557251] -> imaplen=21
[ 0.559906] -> match=1 (imaplen=17)
[ 0.563476] -> newintsize=2, newaddrsize=0
[ 0.567619] -> imaplen=14
[ 0.570297] -> new parent: /soc8313@e0000000/pic@700
[ 0.575312] -> got it !, intspec=12
[ 0.581054] PCI->OF bus map:
[ 0.583763] 0 -> 0
[ 0.585819] PCI: bridge rsrc 0..fffff (100), parent c030f44c
[ 0.591403] PCI: bridge rsrc 90000000..9fffffff (200), parent c030f430
[ 0.597884] PCI: bridge rsrc 80000000..8fffffff (1200), parent c030f430
[ 0.604490] PCI:0000:01:0b.0: Resource 0: 0000000000000000-0000000000001fff (f=200)
[ 0.612059] PCI: Cannot allocate resource region 0 of device 0000:01:0b.0
[ 0.618795] PCI:0000:02:0c.0: Resource 0: 0000000000000000-0000000000001fff (f=200)
[ 0.626400] PCI: Cannot allocate resource region 0 of device 0000:02:0c.0
[ 0.656430] PCI: Failed to allocate mem resource #0:2000@0 for 0000:01:0b.0
[ 0.663368] ------------[ cut here ]------------
[ 0.667918] kernel BUG at arch/powerpc/kernel/pci_32.c:589!
[ 0.673451] Oops: Exception in kernel mode, sig: 5 [#1]
[ 0.678627] MPC8313 RDB
[ 0.681046] Modules linked in:
[ 0.684075] NIP: c02eeb48 LR: c02eeb48 CTR: c000ffe4
[ 0.689002] REGS: cffc1e80 TRAP: 0700 Not tainted (2.6.23-gd2c719c0-dirty)
[ 0.696080] MSR: 00029032 <EE,ME,IR,DR> CR: 22044022 XER: 00000000
[ 0.702392] TASK = cffe0ba0[1] 'swapper' THREAD: cffc0000
[ 0.707572] GPR00: c02eeb48 cffc1f30 cffe0ba0 fffffff4 00002931 ffffffff 00004000 00002931
[ 0.715866] GPR08: 00000033 c0330000 00002931 fdffe505 42044022 3b063644 c0298b90 c0298b80
[ 0.724161] GPR16: c0298bdc cffc1f98 c0298bc4 c0306e28 c0298bf0 c0298c04 c0300000 00000000
[ 0.732455] GPR24: c0330000 c0330000 c0330000 c032c24c c0334c4c cffea000 00000000 cffea000
[ 0.740922] Call Trace:
[ 0.743344] [cffc1f30] [c02eeb48] (unreliable)
[ 0.747836] [cffc1f60] [c02e41f4]
[ 0.751205] [cffc1ff0] [c000fec4]
[ 0.754573] Instruction dump:
[ 0.757512] 2f800000 419e0018 7c0903a6 4e800421 2f830000 409e0020 813f01a4 552000c2
[ 0.765200] 7fa3eb78 901f01a4 7fc4f378 4be62d6d <0f030000> 2f9e0005 3bff001c 3bde0001
[ 0.773069] Kernel panic - not syncing: Attempted to kill init!
[ 0.778940] Rebooting in 1 seconds..
next reply other threads:[~2014-02-15 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 12:33 Anand Mistry [this message]
2014-02-18 0:50 ` PCI-PCI bridge configuration in linux device tree Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140215115045.M44796@Spectross.com \
--to=anand.mistry@spectross.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).