Subject: Re: A TODO list for cardbus/ PCMCIA support.
To: Chris G. Demetriou <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 06/17/1999 12:49:38
Chris G. Demetriou writes:


Personally, I'd punt on supporting CBB's as PCICs via the
PCIC-compatible mapping if no CBB driver is loaded, leaving only two
cases. At least for a first implementation.  (we dont support, e.g.,
 EISA boards via ISA, do we?)  The rest looks okay.

>FWIW, the things that I see as being necessary for CardBus support
>are, in approximate order:

[numbered instead of starred]

      #1. enough the PCI bus space management/"bin packing" to
          make sure you can arrange for CBBs to be properly mapped.

                -- at this point, if the CBBs have support compatibility
                   register access you can at least use the PCIC
                   driver with them.  It would seem that for many
                   bridges to enable compat. register access they
                   _need_ their register BAR to be mapped.  I did N
                   gross PCI bar hacks for people to make their CBBs
                   function to this minimal level, i.e. _any use of
                   PCMCIA at all for their laptop__.            
      #2. the PCMCIA 'access registers via various methods' code.

      #3. code to cope with CBB's well enough to make provide the same
          services as PCIC, i.e. allow you to use PCMCIA cards (with
          the CBB register access method).

                -- at this point you're using PCMCIA cards on CBBs
                   with CBB style register access and enough support
                   from the CBBs to deal with insertions and removals
                   of at least some types of cards.

      #4. the stuff relating to CIS, i.e. making the existing CIS
          tuple code cope with variety in its sources of input.
      #5. coping with mapping inserted CB cards, i.e. dealing with
          their CIS, mapping their BARs, etc.

                -- at this point you're actually using CB cards.

      #6. coping with unmapping removed or to-be-removed CB cards.

                -- at this point you can remove CB cards.

These look reasonable to me.

As far as I can tell, the hard bits of #4, #5, and #6 are already done
in the Japanese cardbus patches. Jason has committed to working on #1,
when his current UVM stuff is done.

To make more progress we need to nail down the method interfaces to
use in #2 and #4. I'd imagined handles with methods to read and write
registers, instantiated for the pcic and for cardbus bridges.

I dont recall if hayakawa-san's CardBus patches do that or not.
But we're a lot further along than it looks; what we need is to
co-ordinate the people working on the various pieces.

I dont see why, say, #4 cant be done in the Japanese patche tree in
parallel with Jason (or whoever) doing work on #1.

Re your closing comments: `me too'.  That's why I'm spending time
trying to co-ordinate the various bits.