access to CF card registers doesn't look good

Ronak Chokshi rchokshi at marvell.com
Thu Feb 22 16:38:29 EST 2007


Inline (See Ronak >>).

Thanks
Ronak

-----Original Message-----
From: Marcelo Tosatti [mailto:marcelo at kvack.org] 
Sent: Thursday, February 22, 2007 12:17 PM
To: Holger Schurig; Ronak Chokshi
Cc: libertas-dev at lists.infradead.org
Subject: Re: access to CF card registers doesn't look good

(Ronak: Holger is writing support for CF interface and we need some help
here).

Hi Holger,

On Tue, Feb 20, 2007 at 05:06:04PM +0100, Holger Schurig wrote:
> Hmm, I'm already at the first obstacle.
> 
> I insert my CF card ("product info: "Marvell", "802.11 CF", "ID: 
> 04", "", manfid: 0x02df, 0x8103); my driver loads and I parse 
> the CIS. I then get
> 
>     mrv8xxx_cs: enter libertas_cs_config() at 134
>     mrv8xxx_cs: eth1: at 0.0, irq 11, io 0xc100-0xc17f
> 
> The from-to numbers are
> 
>    p_dev->io.BasePort1,
>    p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1
> 
> Now I map this in and get a dump of the registers:
> 
>    mem = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1);
>    for (i=0; i<0x200; i+=2) {
>          printk("%04x: %04x\n", i, ioread16(card->mem + i));
>    }
> 
> and I get the dump at the end of my message. However, the spec 
> that I have talks in the context of the CF Interface / Firmware 
> download:
> 
>    Check the Card Configuration and Scratch port register (0x3f)

The docs I have mention _0x3E_, and accordingly to your dump that is
zeroed:

> 003e: 008f

So it seems fine (bootloader ready to download firmware). Now I'm not
sure whether the firmware type for CF that you have is single stage or
double (second) stage.
Ronak >> It should be two stage download.

Do you have the firmware for the Windows driver?

Ronak, can you clarify the situation with reference to CF for us,
please?

>    - if it is 0x5a, firmware is already there
>    - if it is 0x00, bootloader is ready to download firmware
>    - else, this register has an invalid value
> 
> So the question is: does my card need the helper download?  Am I 
> accessing the hardware correctly?  Where am I dumb?

Ronak >> If you are getting 0x00, there should be no firmware in the SoC
and the driver should be downloading the firmware through the 2-stage
download method. If you are getting 0x5a then the firmware is already
running and the device should be up and running.




More information about the libertas-dev mailing list