access to CF card registers doesn't look good

Marcelo Tosatti marcelo at kvack.org
Thu Feb 22 15:17:26 EST 2007


(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.

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?



More information about the libertas-dev mailing list