More questions on PCMCIA internals with focus on MIPS....

"Steven J. Hill" <[email protected]> Sat, 27 Sep 2003 13:01:05 -0400
Newsgroups gmane.linux.pcmcia.devel
Message-ID <[email protected]>
Greetings again.

I am working on another MIPS-based board using PCI. I am
still using my TI PCI1225 PCI card. The issue this time
is that I have a much smaller PCI Memory space, 64MB to
be precise. Here is the dump of the memory and port
spaces.

bash-2.05# cat /proc/ioports
00001000-00100fff : PCI I/O space
   00001000-00004fff : PCI CardBus #01
   00005000-000050ff : PCI CardBus #01
   00005400-000054ff : PCI CardBus #05
   00005800-000058ff : PCI CardBus #05
   0000a010-0000a017 : ide0
   0000a100-0000a1ff : 8139too

bash-2.05# cat /proc/iomem
00000000-07ffffff : System RAM
   00100000-00341b27 : Kernel code
   00362000-003a7fff : Kernel data
18000000-1bffffff : PCI Memory space
   18001000-18400fff : PCI CardBus #01
   18800000-18bfffff : PCI CardBus #01
   18c00000-18ffffff : PCI CardBus #05
   19000000-193fffff : PCI CardBus #05
   1bc00000-1bc00fff : usb-ohci
   1bc20200-1bc202ff : 8139too
ff1ff300-ff1ff323 : serial
ff1ff400-ff1ff423 : serial

I have three items that I would like to discuss.

   1) I realize that PCMCIA is very x86-centric, but for other
      architectures like MIPS, we have a larger I/O port space.
      It seems that trying to specify a port address larger than
      0xffff make card services rather upset. However, this does
      not seem to be a trivial change as everything else in the
      kernel using that same constraint of a 16-bit value for
      I/O port values.

   2) I have questions about resource probing with regards to the
      I/O memory. If I try and use the following in my 'config.opts'
      file, PCMCIA devices inserted will not work;

         include port 0x00001000-0x0000ffff
	include memory 0x18000000-0x1bffffff

      However, if I do it this way:

         include port 0x00001000-0x0000ffff
         exclude memory 0x18001000-0x18400fff
         include memory 0x18410000-0x187fffff
         exclude memory 0x18800000-0x193fffff
         include memory 0x19400000-0x1bbfffff
         exclude memory 0x1bc00000-0x1bc00fff
         include memory 0x1bc10000-0x1b2001ff
         exclude memory 0x1bc20200-0x1bc202ff
         include memory 0x1bc30000-0x1bffffff

      Things will work just fine. It also seems that when I
      specify an 'include memory' directive that the starting
      address has to be aligned on a 64KB boundary, otherwise
      that address range is ignored. Why is this?

   3) The final item has to do with the same above configuration.
      It should be obvious that the size of my PCI memory space
      is only 64MB total in size. If I attempt to insert a compact
      flash card that is 64MB in size, the board will hang. I have
      not gone deep into the code yet, but should not the PCMCIA
      code recognize that it will be impossible to map the card
      into the memory space or is it being naughty and going outside
      the memory address space?

Thank you very much in advance.

-Steve



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf