<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hi all,</div>
<div>I am trying to setup the PCI on a Flattened Device Tree (DTS file) for a Microsys MPX8349 board. I have the PCI outbound windows setup as follows:</div>
<div>0xA0000000 of size 0x20000000, none pre-fechable PCI memory window</div>
<div>0xD8000000 of size 0x01000000, PCI IO window</div>
<div>These windows are setup on Uboot and I can see the configuration space of PCI and the PCI card installed from Uboot.</div>
<div>When I try to boot my linux kernel (2.6.23 stable Denx kernel) it crashes with:</div>
<div> </div>
<div>[ 0.000000] Found MPC83xx PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0</div>
<div>[ 0.000000] Observed: pci a0000000 phys ffffffff00000000 size 20000000</div>
<div>[ 0.000000] phb0: MEM 0xffffffff00000000 -> 0x11ffffffe</div>
<div>[ 0.000000] Observed: pci d8000000 phys ffffffff00000000 size 1000000</div>
<div>arch: exit</div>
<div>[ 0.000000] Zone PFN ranges:</div>
<div>[ 0.000000] DMA 0 -> 65536</div>
<div>[ 0.000000] Normal 65536 -> 65536</div>
<div>[ 0.000000] Movable zone start PFN for each node</div>
<div>[ 0.000000] early_node_map[1] active PFN ranges</div>
<div>[ 0.000000] 0: 0 -> 65536</div>
<div>[ 0.000000] Built 1 zonelists in Zone order. Total pages: 65024</div>
<div>[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.1:/home/OPTISCAN/janakas/nfs ip=192.168.1.15:192.168.1.1:192.168.1.1:255.255.255.0:xepm2:eth0:off console=ttyS0,9600</div>
<div>[ 0.000000] IPIC (128 IRQ sources) at fdffb700</div>
<div>[ 0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)</div>
<div>[ 0.001117] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)</div>
<div>[ 0.085122] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)</div>
<div>[ 0.194097] Memory: 255232k/262144k available (4096k kernel code, 6672k reserved, 168k data, 116k bss, 156k init)</div>
<div>[ 0.337215] Mount-cache hash table entries: 512</div>
<div>[ 0.392115] NET: Registered protocol family 16</div>
<div> </div>
<div>[ 0.459868] PCI: Probing PCI hardware</div>
<div>[ 0.503247] Fixup res 0 (1208) of dev 0000:00:0d.0: a0000000 -> ffffffff</div>
<div>[ 0.583128] Fixup res 1 (200) of dev 0000:00:0d.0: ffffffffa4000000 -> 3ffffff</div>
<div>[ 0.669552] Fixup res 6 (7200) of dev 0000:00:0d.0: 0 -> 5fffffff</div>
<div>[ 0.742403] Try to map irq for 0000:00:0d.0...</div>
<div>[ 0.795365] pci_busdev_to_OF_node(0,0x68)</div>
<div>[ 0.843233] parent is /soc8349@e0000000/pci@8500</div>
<div>[ 0.899500] result is <NULL></div>
<div>[ 0.935174] debug 1112</div>
<div>[ 0.962902] PCI->OF bus map:</div>
<div>[ 0.997267] 0 -> 0</div>
<div>[ 1.021159] debug 1124</div>
<div>[ 1.049295] PCI: bridge rsrc 0..ffffffff (100), parent c0404fe4</div>
<div>[ 1.120308] PCI:0000:00:0d.0: Resource 0: 00000000ffffffff-0000000003fffffe (f=1208)</div>
<div>[ 1.213074] PCI: Cannot allocate resource region 0 of device 0000:00:0d.0</div>
<div>[ 1.294229] PCI: parent is c044d05c: 00000000ffffffff-000000001ffffffe (f=200)</div>
<div>[ 1.381720] PCI:0000:00:0d.0: Resource 1: 0000000003ffffff-000000000403fffe (f=200)</div>
<div>[ 1.473369] PCI: Cannot allocate resource region 1 of device 0000:00:0d.0</div>
<div>[ 1.554532] PCI:0000:00:0d.0: Resource 2: 00000000d8000000-00000000d800007f (f=101)</div>
<div>[ 1.646210] debug 1128</div>
<div>[ 1.674012] debug 1134</div>
<div>[ 1.702129] [debug 48]Size 04000000, Algn 04000000, Min 10000000, Type 00001300</div>
<div>[ 1.789877] [debug 48]Size 04000000, Algn 04000000, Min 10000000, Type 00000300</div>
<div>[ 1.877345] PCI: Failed to allocate mem resource #0:4000000@0 for 0000:00:0d.0</div>
<div>[ 1.963755] ------------[ cut here ]------------</div>
<div>[ 2.018513] kernel BUG at arch/powerpc/kernel/pci_32.c:590!</div>
<div>[ 2.085155] Oops: Exception in kernel mode, sig: 5 [#1]</div>
<div>[ 2.147621] PREEMPT MPX8349</div>
<div>[ 2.180940] Modules linked in:</div>
<div>[ 2.217386] NIP: c03e3c48 LR: c03e3c48 CTR: c001065c</div>
<div>[ 2.276737] REGS: cffc3e90 TRAP: 0700 Not tainted (2.6.23MPX8349_PowerPC)</div>
<div>[ 2.361070] MSR: 00029032 <EE,ME,IR,DR> CR: 24004022 XER: 00000000</div>
<div>[ 2.437081] TASK = cffc1a20[1] 'swapper' THREAD: cffc2000</div>
<div>[ 2.499551] GPR00: c03e3c48 cffc3f40 cffc1a20 fffffff0 00000001 00000001 00000000 00000033</div>
<div>[ 2.599508] GPR08: 00000000 00000000 0000114e c0430000 42004022 08000180 0fffd000 00800000</div>
<div>[ 2.699464] GPR16: ffffffff 00000001 00000000 c0380000 c0400000 c0400000 00000000 c0380000</div>
<div>[ 2.799420] GPR24: c0430000 c04312a0 c04312a0 cffe9990 cffe9800 cffe9990 00000000 00000000</div>
<div>[ 2.901459] NIP [c03e3c48] pcibios_init+0x1f8/0x274</div>
<div>[ 2.959767] LR [c03e3c48] pcibios_init+0x1f8/0x274</div>
<div>[ 3.017033] Call Trace:</div>
<div>[ 3.046189] [cffc3f40] [c03e3c48] pcibios_init+0x1f8/0x274 (unreliable)</div>
<div>[ 3.125321] [cffc3f70] [c03d9898] kernel_init+0xa8/0x29c</div>
<div>[ 3.188835] [cffc3ff0] [c0010498] kernel_thread+0x44/0x60</div>
<div>[ 3.253389] Instruction dump:</div>
<div>[ 3.288791] 2f800000 419e0018 7c0803a6 4e800021 2f830000 409e0020 813d000c 552000c2</div>
<div>[ 3.381458] 7f83e378 7fe4fb78 901d000c 4bdca38d <0f030000> 2f9f0005 3bde001c 3bff0001</div>
<div>[ 3.476213] Kernel panic - not syncing: Attempted to kill init!</div>
<div>[ 3.547013] Rebooting in 180 seconds..</div>
<div> </div>
<div> </div>
<div> </div>
<div>My DTS file entries for PCI are as follows:</div>
<div> </div>
<div>pci@8500 {</div>
<div> interrupt-map-mask = < // Mask the child UnitIrqSpec</div>
<div> //ff00 0 0 7</div>
<div> ffff ff ff f</div>
<div> >;</div>
<div> interrupt-map = <</div>
<div> // Child UnitIrqSpec, Parent PIC handle, Parent UnitIrqSpec</div>
<div> // PCI unit address (0000 0 0), Interrupt specifier IDSEL 0x0D (CRX board hard wired to IDSEL 13),</div>
<div> // parent Phandle, IRQ7=0x17 (jumper based) level sensitive(8)</div>
<div> //0d00 0 0 1 &ipic 17 8</div>
<div> 00006800 0 0 1 &ipic 17 8</div>
<div> >;</div>
<div> interrupt-parent = < &ipic >;</div>
<div> interrupts = <42 8>; //PCI1 interrupt, level sensitive</div>
<div> bus-range = <0 0>; //Bus number and largest bus under this</div>
<div> /*</div>
<div> struct ranges_pci {</div>
<div> unsigned int pci_space; //Prefechable/relocatable .... IEEE1275</div>
<div> u64 pci_addr;</div>
<div> phys_addr_t phys_addr;</div>
<div> u64 size;</div>
<div> };</div>
<div> */</div>
<div> ranges = < 02000000 0 A0000000 A0000000 0 20000000</div>
<div> 01000000 0 D8000000 D8000000 0 01000000 >;</div>
<div> clock-frequency = <1FCA055>; //33333333Hz</div>
<div> #interrupt-cells = <1>; //PCI aparently uses 1</div>
<div> #size-cells = <2>; //Max of 2 ints</div>
<div> #address-cells = <3>; //int size</div>
<div> reg = <8500 100>; //??</div>
<div> compatible = "fsl,mpc8349-pci";</div>
<div> device_type = "pci";</div>
<div> };</div>
<div> </div>
<div> </div>
<div>What am I doing wrong ?</div>
<div>Thanks in advance.</div>
<div> Janaka</div>
<div> </div>
</font>
</body>
</html>