<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2800.1555" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have a Freescale MPC8245 machine running Montavista Linux (kernel 
2.4.20).</DIV>
<DIV>There are two devices connected to the PCI bus: </DIV>
<DIV>a USB host controller (VIA VT6212L) and a single-chip network switch 
(Broadcom BCM5650).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Now&nbsp;BCM5650 is working but VT6212L is not.</DIV>
<DIV>I tried to modify the PCI code but met some problems.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here&nbsp;are the PCI information and boot message:</DIV>
<DIV>&nbsp;</DIV>
<DIV>Bus 0, device&nbsp; 0, devfn&nbsp; 0 (id 1057-0006, headertype 
0x00)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 0: mask 0x00000008, 
now at 0x00000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 0: type 
mem, size 0 (0MB)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 1: mask 
0xfffff000, now at 0x00000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
region 1: type mem, size 4096 
(4KB)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 2: mask 0x00000008, 
now at 0x00000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 2: type 
mem, size 0 (0MB)<BR>Bus 0, device 16, devfn&nbsp; 0 (id 14e4-5650, headertype 
0x00)&nbsp; &lt;-- BCM5650<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 
0: mask 0xffff0004, now at 
0xbfff0000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 0: type mem, 
size 65536 (64KB)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 1: mask 
0x000000ff, now at 0x00000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
region 1: type I/O, size 65284 (65284B)<BR>Bus 0, device 17, devfn&nbsp; 0 (id 
1106-3038, headertype 0x00)&nbsp; &lt;-- VT6212L (UHCI 
1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 4: mask 0xffffffe1, now 
at 0x00bfffe0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 4: type I/O, 
size 32 (32B)<BR>Bus 0, device 17, devfn&nbsp; 1 (id 1106-3038, headertype 
0x00)&nbsp; &lt;-- VT6212L (UHCI 
2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 4: mask 0xffffffe1, now 
at 0x00bfffc0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 4: type I/O, 
size 32 (32B)<BR>Bus 0, device 17, devfn&nbsp; 2 (id 1106-3104, headertype 0x00) 
&lt;-- VT6212L (EHCI)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; region 0: 
mask 0xffffff00, now at 0xbffeff00<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
region 0: type mem, size 256 (256B)</DIV>
<DIV>--</DIV>
<DIV>PCI: Probing PCI hardware<BR>PCI:00:00.0 Resource 0 [00000000-ffffffff] is 
unassigned<BR>PCI:00:00.0 Resource 1 [00000000-00000fff] is 
unassigned<BR>PCI:00:00.0 Resource 2 [00000000-ffffffff] is unassigned<BR>PCI: 
bridge rsrc 0..bfffff (100), parent c0179de4<BR>PCI: bridge rsrc 
80000000..fcffffff (200), parent c0179e00<BR>PCI:00:10.0: Resource 0: 
bfff0000-bfffffff (f=204)&nbsp;&nbsp; &nbsp; &lt;-- BCM5650<BR>PCI:00:11.0: 
Resource 4: 00bfffe0-00bfffff (f=101)&nbsp;&nbsp;&nbsp; &lt;-- VT6212L (UHCI 
1)<BR>PCI:00:11.1: Resource 4: 00bfffc0-00bfffdf (f=101)&nbsp;&nbsp; &lt;-- 
VT6212L (UHCI 2)<BR>PCI:00:11.2: Resource 0: bffeff00-bffeffff 
(f=200)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;-- VT6212L (EHCI)</DIV>
<DIV>--</DIV>
<DIV>&nbsp;</DIV>
<DIV>It seems no problem with the allocated resource regions for VT6212L, but I 
got "Timeout" message printed by USB&nbsp;driver.</DIV>
<DIV>So, I modify the function "mpc10x_bridge_set_resources" in 
"arch/ppc/kernel/mpc10x_common.c":</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;case 
MPC10X_MEM_MAP_B:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
pci_init_resource(&amp;hose-&gt;io_resource,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x00000000,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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DIV>
<DIV>--</DIV>
<DIV>After modification, the USB 1.x driver (UHCI) is working, and EHCI is still 
not working.</DIV>
<DIV>BUT I don't know why the UHCI works if I&nbsp; do the above 
modification?</DIV>
<DIV>&nbsp;</DIV>
<DIV>The PCI information&nbsp;after modification is shown below:</DIV>
<DIV>&nbsp;</DIV>
<DIV>Bus&nbsp; 0, device&nbsp; 17, function&nbsp; 0:<BR>&nbsp;&nbsp;&nbsp; Class 
0c03: PCI device 1106:3038 (rev 97).<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IRQ 
1.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Master Capable.&nbsp; 
Latency=128.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I/O at 0xffe0 
[0xffff].&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;-- I/O change to 0xffe0<BR>&nbsp; Bus&nbsp; 0, device&nbsp; 17, 
function&nbsp; 1:<BR>&nbsp;&nbsp;&nbsp; Class 0c03: PCI device 1106:3038 (rev 
97).<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IRQ 1.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Master Capable.&nbsp; Latency=128.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I/O at 
0xffc0 
[0xffdf].&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;-- I/O&nbsp;change to 0xffc0<BR>&nbsp; Bus&nbsp; 0, device&nbsp; 17, 
function&nbsp; 2:<BR>&nbsp;&nbsp;&nbsp; Class 0c03: PCI device 1106:3104 (rev 
99).<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IRQ 1.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Master Capable.&nbsp; Latency=128.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Non-prefetchable 32 bit memory at 0xbffeff00 [0xbffeffff].</DIV>
<DIV>--</DIV>
<DIV>&nbsp;</DIV>
<DIV>I do the modification for the PCI memory configuration similar to the 
modification for PCI I/O configuration:</DIV>
<DIV>&nbsp;</DIV>
<DIV>[arch/ppc/kernel/mpc10x_common.c]</DIV>
<DIV>case MPC10X_MEM_MAP_B:</DIV>
<DIV>&nbsp;... snipped</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;pci_init_resource 
(&amp;hose-&gt;mem_resources[0],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x00000000,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
/*&nbsp; original value: 0x80000000, 
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x000fffff,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
/*&nbsp; original value: 0xfcffffff, 
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
IORESOURCE_MEM,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"PCI host bridge");</DIV>
<DIV>--</DIV>
<DIV>[include/asm/mpc10x.h]</DIV>
<DIV>#define MPC10X_MAPB_ISA_MEM_BASE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x00000000 /* original value: 0x80000000 */</DIV>
<DIV>... snipped</DIV>
<DIV>#define MPC10X_MAPB_PCI_MEM_START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x00000000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* original value: 0x80000000 
*/<BR>#define MPC10X_MAPB_PCI_MEM_END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
(0x00100000 - 1) /* original value: (0xC0000000 - 1) */</DIV>
<DIV>--</DIV>
<DIV>Surprisingly, after this modification, the USB2.0 driver (EHCI) can 
work.</DIV>
<DIV>BUT,&nbsp;the BCM5650 driver failed...</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here are the PCI information and boot message:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; Bus&nbsp; 0, device&nbsp; 16, function&nbsp; 
0:<BR>&nbsp;&nbsp;&nbsp; Class 0280: PCI device 14e4:5650 (rev 
17).<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Master Capable.&nbsp; 
Latency=128.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Non-prefetchable 64 bit memory at 
0xf0000 [0xfffff].&nbsp; &lt;-- BCM5650 PCI memory address change to 
0xf0000<BR>&nbsp; Bus&nbsp; 0, device&nbsp; 17, function&nbsp; 
0:<BR>&nbsp;&nbsp;&nbsp; Class 0c03: PCI device 1106:3038 (rev 
97).<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IRQ 1.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Master Capable.&nbsp; Latency=128.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I/O at 
0xffe0 [0xffff].<BR>&nbsp; Bus&nbsp; 0, device&nbsp; 17, function&nbsp; 
1:<BR>&nbsp;&nbsp;&nbsp; Class 0c03: PCI device 1106:3038 (rev 
97).<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IRQ 1.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Master Capable.&nbsp; Latency=128.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I/O at 
0xffc0 [0xffdf].<BR>&nbsp; Bus&nbsp; 0, device&nbsp; 17, function&nbsp; 
2:<BR>&nbsp;&nbsp;&nbsp; Class 0c03: PCI device 1106:3104 (rev 
99).<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IRQ 1.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Master Capable.&nbsp; Latency=128.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Non-prefetchable 32 bit memory at 0xeff00 [0xeffff]. &lt;-- EHCI PCI memory 
address change to 0xeff00</DIV>
<DIV>--</DIV>
<DIV>PCI: bridge rsrc 0..ffff (100), parent c016fde4<BR>PCI: bridge rsrc 
0..fffff (200), parent c016fe00<BR>PCI:00:10.0: Resource 0: 000f0000-000fffff 
(f=204)<BR>PCI:00:11.0: Resource 4: 0000ffe0-0000ffff (f=101)<BR>PCI:00:11.1: 
Resource 4: 0000ffc0-0000ffdf (f=101)<BR>PCI:00:11.2: Resource 0: 
000eff00-000effff (f=200)</DIV>
<DIV>--</DIV>
<DIV>And the failure message during inserting BCM5650 driver into kernel 
is:</DIV>
<DIV>&nbsp;</DIV>
<DIV>__ioremap(): phys addr f0000 is RAM lr c0011db0<BR>Oops: kernel access of 
bad area, sig: 11<BR>NIP: C4881164 XER: 20000000 LR: C4887EDC SP: C3729C90 REGS: 
c3729be0 TRAP: 0300<BR>&nbsp;&nbsp; Not tainted<BR>MSR: 00001032 EE: 0 PR: 0 FP: 
0 ME: 1 IR/DR: 11<BR>DAR: 00000148, DSISR: 22000000<BR>TASK = c3728000[109] 
'insmod' Last syscall: 128</DIV>
<DIV>... snipped</DIV>
<DIV>--</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>I have really no idea about this problem because I'm pretty new to PowerPC 
and PCI&nbsp;architecture :'(</DIV>
<DIV>(So I think my modification&nbsp;may not reasonable)</DIV>
<DIV>Can anyone help me solve this problem ?</DIV>
<DIV>Any pointers and help would be greatly appreciated.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you!</DIV>
<DIV><FONT size=2><FONT size=3>Kenny</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=3></FONT>&nbsp;</DIV></FONT></BODY></HTML>