[Avila] PCI device resource allocation issue
Tim Harvey
tim_harvey at yahoo.com
Tue Jan 23 14:09:17 EST 2007
It looks like this issue here is that the video encoder is requesting 64MB =
of PCI memory space and thats the limit that the IXP4xx in 'direct PCI regi=
ster mode' can provide access to. This raises a few questions:=0A=0A - ha=
s anyone had any luck using CONFIG_IXP4XX_INDIRECT_PCI? I find that on 2.6=
.19 I can't even get the kernel/modules to build when setting this and on 2=
.6.15-uc0 (from the GW BSP 0.6) I've found that while the kernel builds, th=
e madwifi driver crashes=0A - assuming that the video encoder does not act=
ually need the full 64MB of PCI memory space, is there a method I can use w=
ithout completly hacking the kernel's PCI probe functions to 're-configure'=
and limit this?=0A=0AThanks,=0A=0ATim =0A=0A----- Original Message ----=0A=
From: Tim Harvey <tim_harvey at yahoo.com>=0ATo: avila at lists.unixstudios.net=
=0ASent: Monday, January 22, 2007 3:14:37 PM=0ASubject: [Avila] PCI device =
resource allocation issue=0A=0AI'm troubleshooting an issue where Linux is =
sptting out 'PCI: Failed to allocate mem resource' errors keeping me from u=
sing two PCI devices in an avila system at the same time. Can anyone expla=
in to me how to debug/understand/resolve an PCI device resource allocation =
issue such as the following?=0A=0AHere are some relevant excepts from dmesg=
:=0A=0ALinux version 2.6.19 (tharvey at devel) (gcc version 3.4.4) #16 Mon Jan=
22 14:49:16 PST 2007=0ACPU: XScale-IXP42x Family [690541f1] revision 1 (AR=
Mv5TE), cr=3D000039ff=0AMachine: Intel IXDP425 Development Platform=0AMemor=
y policy: ECC disabled, Data cache writeback=0A...=0AMemory: 64MB =3D 64MB =
total=0AMemory: 56856KB available (1480K code, 303K data, 84K init)=0AMount=
-cache hash table entries: 512=0A...=0APCI: Failed to allocate mem resource=
#0:10000 at 4c000000 for 0000:00:02.0=0APCI: Failed to allocate mem resource =
#0:1000 at 4c000000 for 0000:00:05.0=0APCI: Failed to allocate mem resource #0=
:1000 at 4c000000 for 0000:00:05.1=0APCI: Failed to allocate mem resource #0:1=
00 at 4c000000 for 0000:00:05.2=0A=0Aand lspci -vvv=0A00:01.0 Class 0400: 4444=
:0016 (rev 01)=0A Subsystem: ff01:d998=0A Control: I/O- Mem- =
BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-=
=0A Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=3Dmedium >TAbor=
t- <TAbort- <MAbort- >SERR- <PERR-=0A Interrupt: pin A routed to IRQ=
28=0A Region 0: Memory at 48000000 (32-bit, prefetchable) [disabled=
] [size=3D64M]=0A Capabilities: [44] Power Management version 2=0A =
Flags: PMEClk- DSI- D1- D2- AuxCurrent=3D0mA PME(D0-,D1-,D2-,=
D3hot-,D3cold-)=0A Status: D0 PME-Enable- DSel=3D0 DScale=3D=
0 PME-=0A=0A00:02.0 Class 0200: 168c:0013 (rev 01)=0A Subsystem: 168=
c:2041=0A Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop=
- ParErr+ Stepping- SERR+ FastB2B-=0A Status: Cap+ 66Mhz- UDF- FastB=
2B+ ParErr- DEVSEL=3Dmedium >TAbort- <TAbort- <MAbort- >SERR- <PERR-=0A =
Interrupt: pin A routed to IRQ 27=0A Capabilities: [44] Power Ma=
nagement version 2=0A Flags: PMEClk- DSI- D1- D2- AuxCurrent=
=3D375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)=0A Status: D0 PME-E=
nable- DSel=3D0 DScale=3D2 PME-=0A=0A00:05.0 Class 0c03: 1131:1561 (rev 11)=
(prog-if 10)=0A Subsystem: 1131:1561=0A Control: I/O- Mem- B=
usMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-=0A=
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=3Dmedium >TAbort- =
<TAbort- <MAbort- >SERR- <PERR-=0A Interrupt: pin A routed to IRQ 0=
=0A Region 0: Memory at <ignored> (32-bit, non-prefetchable) [disabl=
ed]=0A Capabilities: [dc] Power Management version 2=0A =
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=3D100mA PME(D0-,D1+,D2-,D3hot+,D3=
cold+)=0A Status: D0 PME-Enable+ DSel=3D0 DScale=3D0 PME+=0A=
=0A00:05.1 Class 0c03: 1131:1561 (rev 11) (prog-if 10)=0A Subsystem:=
1131:1561=0A Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGAS=
noop- ParErr+ Stepping- SERR+ FastB2B-=0A Status: Cap+ 66Mhz- UDF- F=
astB2B- ParErr- DEVSEL=3Dmedium >TAbort- <TAbort- <MAbort- >SERR- <PERR-=0A=
Interrupt: pin A routed to IRQ 0=0A Region 0: Memory at <ign=
ored> (32-bit, non-prefetchable) [disabled]=0A Capabilities: [dc] Po=
wer Management version 2=0A Flags: PMEClk- DSI- D1+ D2- AuxC=
urrent=3D100mA PME(D0-,D1+,D2-,D3hot+,D3cold+)=0A Status: D0=
PME-Enable- DSel=3D0 DScale=3D0 PME+=0A=0A00:05.2 Class 0c03: 1131:1562 (r=
ev 11) (prog-if 20)=0A Subsystem: 1131:1562=0A Control: I/O- =
Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB=
2B-=0A Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=3Dmedium >TA=
bort- <TAbort- <MAbort- >SERR- <PERR-=0A Interrupt: pin A routed to =
IRQ 0=0A Region 0: Memory at <ignored> (32-bit, non-prefetchable) [d=
isabled]=0A Capabilities: [dc] Power Management version 2=0A =
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=3D100mA PME(D0+,D1+,D2+,D3ho=
t+,D3cold+)=0A Status: D0 PME-Enable- DSel=3D0 DScale=3D0 PM=
E+=0A=0Aand cat /proc/iomem:=0A# cat /proc/iomem =0A00000000-03ffffff : Sys=
tem RAM=0A 0001d000-0018efff : Kernel text=0A 00190000-001dbceb : Kernel =
data=0A48000000-4bffffff : PCI Memory Space=0A 48000000-4bffffff : 0000:00=
:01.0=0A 48000000-4a00ffff : ivtv0=0A50000000-50ffffff : IXP4XX-Flash.0=
=0A 50000000-50ffffff : IXP4XXFlash=0A60000000-60003fff : ixp4xx_qmgr.0=0A=
60000000-60003fff : ixp_qmgr=0Ac8000000-c8000fff : serial8250.0=0A c8000=
000-c800001f : serial=0Ac8001000-c8001fff : serial8250.0=0A c8001000-c8001=
01f : serial=0Ac8007000-c8007fff : ixp4xx_npe.1=0A c8007000-c8007fff : NPE=
-B=0Ac8008000-c8008fff : ixp4xx_npe.2=0A c8008000-c8008fff : NPE-C=0Ac8009=
000-c80091ff : ixp4xx_mac.0=0A c8009000-c80091ff : ixp4xx_mac=0Ac800a000-c=
800a1ff : ixp4xx_mac.1=0A c800a000-c800a1ff : ixp4xx_mac=0A=0A=0AWhat is g=
oing on here? Are the two cards trying to use the same config space? The =
two cards that won't play together are an Atheros based Wifi card (00:02.0 =
Class 0200: 168c:0013) and a video encoder card (00:01.0 Class 0400: 4444:0=
016) - both of which operate fine if the other is not in the board at the s=
ame time. Also note that this board has USB support (00:05.0 Class 0c03: 1=
131:1561, 00:05.1 Class 0c03: 1131:1561, and 00:05.2 Class 0c03: 1131:1562)=
. Both the video encoder card and the Atheros wifi card try to map 0x48000=
000 (64M for the encoder card, and 64K for the wifi card).=0A=0AThanks,=0A=
=0ATim=0A=0A=0A=0A---------------------------------------------------------=
------------=0ATo unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.=
net=0AFor additional commands, e-mail: avila-help at lists.unixstudios.net=0A=
=0A=0A=0A
More information about the Avila
mailing list