PXA2xx pcmcia to compact flash on 2.6.13

John Heil armdev at scsoftware.sc-software.com
Fri Dec 16 08:25:08 EST 2005




On Fri, 16 Dec 2005, Russell King wrote:

> On Fri, Dec 16, 2005 at 04:58:13AM -0800, John Heil wrote:
> > On Fri, 16 Dec 2005, Russell King wrote:
> > > On Thu, Dec 15, 2005 at 10:30:16PM -0800, John Heil wrote:
> > > > My concern is that the PXA270 hardware PCMCIA area, at 0x20000000,
> > > > may not be correctly ioremapped by cs/ds to find where the CIS is being
> > > > returned at.
> > >
> > > It strikes me that it would be far simpler if you were to use the PXA
> > > support already present in the kernel, and maybe just hard-wire the
> > > card detect support to say "Card Present".
> >
> > I do want to use the existing PXA kernel support.
> > My target driver is ide-cs. Getting PXA PCMCIA support to invoke it
> > is what I'm trying to do...
>
> >
> > The board I've got differs from the reference design in that they
> > exchanged Intel's FPGA for a dumbed down CPLD w/o hotplug and w/o
> > the controlling registers Intel had in their FPGA. Thus PCMCIA card
> > variables such as voltage  etc are fixed.
>
> Take a look at pxa2xx_mainstone.c.
>
> 1. Create a copy of it.
> 2. Rename the functions to have appropriate names for your platform.
> 3. Remove the code which configures the socket voltages.
> 4. Remove the code which claims interrupts for card detection and
>    status change.
> 5. Remove the code in the socket_state method, and hard code
>    state->detect to 1.  Read the remainder from the hardware, or
>    hard code them to a sensible state if you can't.

Been there, done that, save for setting some other state->'s as follows

        state->detect = 1;
        state->ready  = 1;
        state->bvd1   = 1;
        state->bvd2   = 1;
        state->vs_3v  = 1;
        state->vs_Xv  = 1;
        state->wrprot = 0;  /* not available */

The Compact Flash was not detected. It just sat there.

So, I looked over the hotplug/cardmgr interface and
decided to call bind_request() directly, pointing it to ide-cs, and then
just call the ide-cs code directly. The result is where I'm at now and
the PCMCIA isn't getting its tuples as it expects, to get things running.

Was this an unreasonable approach given the failure to drive the in-kernel
ide-cs code ?

>
> --
> Russell King
>  Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
>  maintainer of:  2.6 Serial core
>



More information about the linux-pcmcia mailing list