TI1225 on MIPS...
"Steven J. Hill" <[email protected]> Tue, 24 Jun 2003 15:57:49 -0400
| Newsgroups | gmane.linux.pcmcia.devel |
|---|---|
| Message-ID | <[email protected]> |
I am trying to get a PCI->PCMCIA adapter working on a MIPS board
that uses the TI1225. Fortunately, I have the same controller in
my laptop so I was able to figure some stuff out. I am running a
2.4.18 kernel with PCI and PCMCIA taken from 2.4.21. I am using
pcmcia-cs-3.1.27, although newer versions give the same results.
Note that I am using in-kernel PCMCIA support. Here is the output
from my currently booted kernel:
********
lspci -v
********
00:0c.0 Class 0607: 104c:ac1c (rev 01)
Flags: bus master, medium devsel, latency 168, IRQ 59
Memory at 0a000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=01, subordinate=04, sec-latency=176
Memory window 0: 10000000-103ff000 (prefetchable)
Memory window 1: 10400000-107ff000
I/O window 0: 00004000-000040ff
I/O window 1: 00004400-000044ff
16-bit legacy interface ports at 0001
00:0c.1 Class 0607: 104c:ac1c (rev 01)
Flags: bus master, medium devsel, latency 168, IRQ 58
Memory at 0a001000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=05, subordinate=08, sec-latency=176
Memory window 0: 10800000-10bff000 (prefetchable)
Memory window 1: 10c00000-10fff000
I/O window 0: 00004800-000048ff
I/O window 1: 00004c00-00004cff
16-bit legacy interface ports at 0001
***************
cat /proc/iomem
***************
00000000-07ffffff : System RAM
00100000-002ac047 : Kernel code
002c8000-00305fff : Kernel data
0a000000-11ffffff : PCI Memory space
10000000-103fffff : PCI CardBus #01
10400000-107fffff : PCI CardBus #01
10800000-10bfffff : PCI CardBus #05
10c00000-10ffffff : PCI CardBus #05
*****************
cat /proc/ioports
*****************
00001000-01000fff : PCI I/O space
00004000-000040ff : PCI CardBus #01
00004400-000044ff : PCI CardBus #01
00004800-000048ff : PCI CardBus #05
00004c00-00004cff : PCI CardBus #05
14020280-1402029f : eth0
The PCI I/O space starts at physical address 0x80000000, so all addresses
show in /proc/ioports are based from there. My question has to do with the
configuration (or lack thereof) of the Cardbus bridges. The autoscan output
of the PCI bus during boot is:
Scanning bus 00, I/O 0x00001000:0x01001000, Mem 0x0a000000:0x12000000
00:0c.0 Class 0607: 104c:ac1c (rev 01)
CARDBUS Bridge: primary=00, secondary=01
PCI Autoconfig: Found CardBus bridge, device 12 function 0
Mem at 0x0a000000 [size=0x1000]
Scanning sub bus 01, I/O 0x00001000, Mem 0x0a001000
Back to bus 00, sub_bus is 1
00:0c.1 Class 0607: 104c:ac1c (rev 01)
CARDBUS Bridge: primary=00, secondary=02
PCI Autoconfig: Found CardBus bridge, device 12 function 1
Mem at 0x0a001000 [size=0x1000]
Scanning sub bus 02, I/O 0x00001000, Mem 0x0a002000
I have a compact flash card plugged into Socket 0 and I get the following
output with a 'cardctl status'"
bash-2.05# cardctl status
Socket 0:
3.3V 16-bit PC Card
function 0: [ready]
Socket 1:
no card
This shows that at least the Cardbus bridge PCI registers are being
accessed properly. Now if I attempt a 'cardctl info' I get:
bash-2.05# cardctl info
cs: unable to map card memory!
cs: unable to map card memory!
PRODID_1=""
cs: unable to map card memory!
PRODID_2=""
cs: unable to map card memory!
PRODID_3=""
cs: unable to map card memory!
PRODID_4=""
cs: unable to map card memory!
MANFID=0000,0000
FUNCID=255
PRODID_1=""
PRODID_2=""
PRODID_3=""
PRODID_4=""
MANFID=0000,0000
FUNCID=255
This is where my lack of knowledge kicks in. This tells me that the
memory and I/O space for the PC Card itself is not being accessed and
is not properly mapped into the kernel's address space. From previous
emails, the I/O and memory windows above are for the Cardbus bridge
itself, and NOT the PC Card, correct? I also, unfortunately do not
see any lines with 'I/O behind bridge" or "Memory behind bridge" which
may point to my Cardbus bridge not being properly set up. I have not
done any writes to PCI_CB_MEMORY_BASE_0, PCI_CB_IO_BASE_0 and friends
and the values above were what was configured by the Yenta driver. I
also notice that on my x86 laptop using the PCMCIA modules instead,
only I/O windows are shown in the lspci output and they only range from
0x0-0x3 for both sets. I feel pretty close to getting this working. I
should note that the PCI host controller embedded on my MIPS chip is
working properly since I can plug in IDE controllers, network cards
and USB cards with no problems. Any help would be greatly appreciated.
Thanks.
-Steve
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php