Subject: Re: implement for aupcmcia
To: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: port-evbmips
Date: 03/09/2006 09:54:48
KIYOHARA Takashi wrote:
> Hi! Garrett,
>
>
> Please teach me the view of mounting to your aupcmcia.
> the aupcmcia can attach it only one pcmcia. However, we have four register
> set.
> Moreover, PCMCIA uses some GPIO. This will depend to the board. It just to
> the way of arm/sa11x0/sa11xx_pcic.c. SA11xx (and PXA2x0) has pcmcia cont-
> roler (pcic). And use some GPIO (RESET, CD[12]...).
>
First off, aupcmcia doesn't work right now. I'm waiting to get a logic
analyzer to figure out some problems with reads. (Writes seem OK though.)
The way aupcmcia "works" is that it provides a single device instance
with multiple "slots".
The logic for wiring board-specific bits (like GPIOs for card detect,
power up, etc.) is placed in the board-specific code.
So, you have the master aupcmcia.c file that contains the "common" bits.
You also have e.g. evbmips/alchemy/dbau1550.c which has pcmcia related glue:
nslots - 2 for the dbau1550
dbau1550_slot_offset() - returns address offset based on slot number
dbau1550_slot_irq() - maps PCMCIA slot number to IRQ line for card IRQ#.
dbau1550_slot_enable() - routine to power up a slot
dbau1550_slot_disable() - routine to power down a slot
dbau1550_slot_status() - routine to check for card presence
dbau1550_slot_name() - routine to get the "name" of the slot
These are registered with the aupcmcia controller as an
"aupcmcia_machdep" structure in the alchemy_board structure.
Hope that helps.
-- Garrett
> e.g.
> ----
> JORNADA720 (hpcarm) is used
> arm/sa11x0/sa11xx_pcic.c : SA11xx generic
> arm/sa11x0/sa11x1_pcic.c : use companion chip and some GPIO
>
> TWINTAIL (evbarm) is used
> arm/sa11x0/sa11xx_pcic.c : SA11xx generic
> evbarm/g42xxeb/gb225_pcic.c : use companion chip and some GPIO
>
>
> Have you any idea?
> --
> kiyohara
>
--
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134 Fax: 951 325-2191