[Avila] CONFIG_IXP4XX_INDIRECT_PCI - was PCI device resource allocation issue
Tim Harvey
tim_harvey at yahoo.com
Wed Jan 24 16:45:29 EST 2007
Looks like there is no 'standard way' (ie, depends on hardware or hardware
strapping) to configure a PCI devices address decoder, so I'm stuck with the
CONFIG_IXP4XX_INDIRECT_PCI option.
I've 'never' been able to get any PCI device driver to work with
CONFIG_IXP4XX_INDIRECT_PCI - they all seem to oops on __raw_write* calls.
Has anyone had any luck with CONFIG_IXP4XX_INDIRECT_PCI? Without this the the
PCI device options for avila and the ixp4xx platform are pretty limited.
Thanks,
Tim
--- Tim Harvey <tim_harvey at yahoo.com> wrote:
> 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 register
> mode' can provide access to. This raises a few questions:
>
> - has 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, the
> madwifi driver crashes
> - assuming that the video encoder does not actually need the full 64MB of
> PCI memory space, is there a method I can use without completly hacking the
> kernel's PCI probe functions to 're-configure' and limit this?
>
> Thanks,
>
> Tim
>
> ----- Original Message ----
> From: Tim Harvey <tim_harvey at yahoo.com>
> To: avila at lists.unixstudios.net
> Sent: Monday, January 22, 2007 3:14:37 PM
> Subject: [Avila] PCI device resource allocation issue
>
> I'm troubleshooting an issue where Linux is sptting out 'PCI: Failed to
> allocate mem resource' errors keeping me from using two PCI devices in an
> avila system at the same time. Can anyone explain to me how to
> debug/understand/resolve an PCI device resource allocation issue such as the
> following?
>
> Here are some relevant excepts from dmesg:
>
> Linux version 2.6.19 (tharvey at devel) (gcc version 3.4.4) #16 Mon Jan 22
> 14:49:16 PST 2007
> CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=000039ff
> Machine: Intel IXDP425 Development Platform
> Memory policy: ECC disabled, Data cache writeback
> ...
> Memory: 64MB = 64MB total
> Memory: 56856KB available (1480K code, 303K data, 84K init)
> Mount-cache hash table entries: 512
> ...
> PCI: Failed to allocate mem resource #0:10000 at 4c000000 for 0000:00:02.0
> PCI: Failed to allocate mem resource #0:1000 at 4c000000 for 0000:00:05.0
> PCI: Failed to allocate mem resource #0:1000 at 4c000000 for 0000:00:05.1
> PCI: Failed to allocate mem resource #0:100 at 4c000000 for 0000:00:05.2
>
> and lspci -vvv
> 00:01.0 Class 0400: 4444:0016 (rev 01)
> Subsystem: ff01:d998
> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+
> Stepping- SERR+ FastB2B-
> Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR-
> Interrupt: pin A routed to IRQ 28
> Region 0: Memory at 48000000 (32-bit, prefetchable) [disabled]
> [size=64M]
> Capabilities: [44] Power Management version 2
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
> Status: D0 PME-Enable- DSel=0 DScale=0 PME-
>
> 00:02.0 Class 0200: 168c:0013 (rev 01)
> Subsystem: 168c:2041
> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+
> Stepping- SERR+ FastB2B-
> Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR-
> Interrupt: pin A routed to IRQ 27
> Capabilities: [44] Power Management version 2
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
> Status: D0 PME-Enable- DSel=0 DScale=2 PME-
>
> 00:05.0 Class 0c03: 1131:1561 (rev 11) (prog-if 10)
> Subsystem: 1131:1561
> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+
> Stepping- SERR+ FastB2B-
> Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR-
> Interrupt: pin A routed to IRQ 0
> Region 0: Memory at <ignored> (32-bit, non-prefetchable) [disabled]
> Capabilities: [dc] Power Management version 2
> Flags: PMEClk- DSI- D1+ D2- AuxCurrent=100mA
> PME(D0-,D1+,D2-,D3hot+,D3cold+)
> Status: D0 PME-Enable+ DSel=0 DScale=0 PME+
>
> 00:05.1 Class 0c03: 1131:1561 (rev 11) (prog-if 10)
> Subsystem: 1131:1561
> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+
> Stepping- SERR+ FastB2B-
> Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR-
> Interrupt: pin A routed to IRQ 0
> Region 0: Memory at <ignored> (32-bit, non-prefetchable) [disabled]
> Capabilities: [dc] Power Management version 2
> Flags: PMEClk- DSI- D1+ D2- AuxCurrent=100mA
> PME(D0-,D1+,D2-,D3hot+,D3cold+)
> Status: D0 PME-Enable- DSel=0 DScale=0 PME+
>
> 00:05.2 Class 0c03: 1131:1562 (rev 11) (prog-if 20)
> Subsystem: 1131:1562
> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+
> Stepping- SERR+ FastB2B-
> Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR-
> Interrupt: pin A routed to IRQ 0
> Region 0: Memory at <ignored> (32-bit, non-prefetchable) [disabled]
> Capabilities: [dc] Power Management version 2
> Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=100mA
> PME(D0+,D1+,D2+,D3hot+,D3cold+)
> Status: D0 PME-Enable- DSel=0 DScale=0 PME+
>
> and cat /proc/iomem:
> # cat /proc/iomem
> 00000000-03ffffff : System RAM
> 0001d000-0018efff : Kernel text
> 00190000-001dbceb : Kernel data
> 48000000-4bffffff : PCI Memory Space
> 48000000-4bffffff : 0000:00:01.0
> 48000000-4a00ffff : ivtv0
> 50000000-50ffffff : IXP4XX-Flash.0
> 50000000-50ffffff : IXP4XXFlash
> 60000000-60003fff : ixp4xx_qmgr.0
> 60000000-60003fff : ixp_qmgr
> c8000000-c8000fff : serial8250.0
> c8000000-c800001f : serial
> c8001000-c8001fff : serial8250.0
> c8001000-c800101f : serial
> c8007000-c8007fff : ixp4xx_npe.1
> c8007000-c8007fff : NPE-B
> c8008000-c8008fff : ixp4xx_npe.2
> c8008000-c8008fff : NPE-C
> c8009000-c80091ff : ixp4xx_mac.0
> c8009000-c80091ff : ixp4xx_mac
> c800a000-c800a1ff : ixp4xx_mac.1
> c800a000-c800a1ff : ixp4xx_mac
>
>
> What is going 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:0016) - both of which operate fine if the other is not in the board at
> the same time. Also note that this board has USB support (00:05.0 Class
> 0c03: 1131: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
> 0x48000000 (64M for the encoder card, and 64K for the wifi card).
>
> Thanks,
>
> Tim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.net
> For additional commands, e-mail: avila-help at lists.unixstudios.net
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.net
> For additional commands, e-mail: avila-help at lists.unixstudios.net
>
>
More information about the Avila
mailing list