Subject: Re: A TODO list for cardbus/ PCMCIA support.
To: Hayakawa Koichi <haya@arch.sony.co.jp>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-kern
Date: 06/16/1999 22:16:29
Hayakawa Koichi <haya@arch.sony.co.jp> writes:
> I add another:
> 
> 7. The 16-bit pcic code should be shared between ISA- and
>    PCI-pcic and YENTA CardBus bridge.

It's not obvious to me how you mean this statement, but a naive
interpretation leads to something like:

cbb at whatever
pcic at cbb

That's broken.


the PCIC driver's fin eto address pcmcia sockets when you don't have a
native cbb driver, and the cbb's pcmcia compat bits happen to be
enabled.  However, it's wrong for a couple of reasons to try to use
the existing pcic code for cardbus:

* cardbus bridges give you a better way of accessing PCMCIA ExCA(?)
registers.

* the traditional compatibility access mechanism may in fact be
disabled, thereby preventing its use.


as has been stated before, the 'right' abstraction for this type of
stuff is by slot.  autoconfiguration might look like:

for PCMCIA:

	pcic0 at ...
	pcmcia0 at pcic0 controller 0 socket 0 ...
	pcmciadev0 at pcmcia0 ...
	pcmcia1 at pcic0 controller 0 socket 1 ...
	pcmciadev1 at pcmcia1 ...

for cardbus:

	cbb0 at ... function 0
	cardbus0 at cbb0 ...
	pcmciadev0 at cardbus0 ...
	cbb1 at ... function 1
	cardbus1 at cbb1
	cardbusdev0 at cardbus1 ...

It's not hard to do the 'config' attributes and locators so that this
works out right.  the 'cardbus' devices (slots) should provide a
superset of the services of the 'pcmcia' devices (slots) to their children.



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.