Libertas SDIO on TC7901 Arm
Tom Maughan
tom at tmaughan.co.uk
Sun Feb 28 12:36:52 EST 2010
Thanks for the reply.
At 19:28 26/02/2010, Andrey Yurovsky wrote:
>Hi Tom,
>
>On Wed, Feb 24, 2010 at 10:09 AM, Tom Maughan <tom at tmaughan.co.uk> wrote:
> > Searching this list has been very helpful as initially I couldn't even load
> > the firmware. The hotplug script and adding msleep(1) into the firmware
> > loading loop helped.
>
>Where in if_spi.c are you adding the msleep(1) and why?
It was in if_sdio.c.
I was getting 'failed to load helper firmware' very early in the
process. After reading:
http://www.gossamer-threads.com/lists/linux/kernel/863162
I added msleep(1) just after the call:
ret = sdio_writesb(card->func, card->ioport,chunk_buffer, 64);
This fixed the helper loader but the real firmware now failed to
load, so I added the same msleep in if_sdio_prog_real. Now it gets
to the end of both helper and real.
>For what it's worth, the Libertas SDIO driver worked quite well in
>2.6.24 last time I used it and a diff between that and
>wireless-testing shows very few changes (nothing that I'd consider
>critical anyway). There are a few minor fixes though.
This is good to know. Chasing one bug is much easier.
>Please turn on MMC debugging (CONFIG_MMC_DEBUG) and log what you see
>from the MMC layer.
I have done but the driver for this chip is VERY light on
debug. The only output is:
> libertas thread: firmware wants 16 bytes
> libertas thread: sending 16 bytes (32 bytes) chunk
> tcc_mmc_start_command: opcode=53, arg=92000020
> tcc_mmc_finish_command: R1: resp[0]=0x00002000
> tcc_mmc_start_command: opcode=52, arg=10004000
> tcc_mmc_finish_command: R1: resp[0]=0x0000100d
> tcc_mmc_start_command: opcode=52, arg=10002000
> tcc_mmc_finish_command: R1: resp[0]=0x000010b0
> tcc_mmc_start_command: opcode=52, arg=10002200
> tcc_mmc_finish_command: R1: resp[0]=0x00001000
> libertas thread: firmware wants 512 bytes
> libertas thread: sending 512 bytes (512 bytes) chunk
The driver also has quite a few lines commented out and some 'fix me' comments.
I think I need to read up on SDIO and put more debug in the
driver. Its as if the driver has issues sending 512 byte
chunks. The helper loads OK as its only sent 60 bytes at a time.
--
Tom
More information about the libertas-dev
mailing list