Libertas with if_spi on pxa270

Andrey Yurovsky andrey at cozybit.com
Mon Jan 26 14:13:00 EST 2009


That's correct -- the '8686 requires that you run the controller in
16-bit mode (or fake it accordingly).  I added notes about this to the
libertas wiki page:
http://wireless.kernel.org/en/users/Drivers/libertas
The bus mode register read is the driver's first actual SPI access.
Once you have that working, chances are good that the rest will work.
The vendor driver implements its own SPI stack instead of using the
kernel's so that's probably why it works on your specific board.

On Mon, Jan 26, 2009 at 9:13 AM, Uli Luckas <u.luckas at road.de> wrote:
> On Monday, 26. January 2009, Dan Williams wrote:
>> On Mon, 2009-01-26 at 16:58 +0200, Mike Rapoport wrote:
>> > Hi,
>> >
>> > Have anybody tried to use 8686 with G-SPI on PXA270?
>> > I've merged libertas-related changes from wireless-testing tree on top of
>> > 2.6.29-rc2, added a "libertas_spi" device to my platform code, but all I
>> > could get from the if_spi was "libertas: Can't read bus mode register."
>> > :(
>>
>> Have you set up the Chip Select stuff correctly for your board (see
>> gpio_cs in the platform data)?  That seems to be board-dependent and
>> there's not a good generic way of doing this in the current kernel
>> sources.
>>
>> That error is the first error that will get reported when the driver
>> actually tries to talk to the card, which requires that the Chip Select
>> stuff be set up correctly.  If you think you've got that already set up,
>> can you manually inspect whether or not the libertas device has actually
>> been selected on the board?
>>
>> Dan
>>
> Judging from the blackfin board setup code, we need to switch the controller
> to 16 bits/word. This seems to not be possible with the pxa spi driver.
> For testing it might help to replace the spi_read/spi_write calls with local
> implementations of a spi_read16/spi_write16 funtion which sets the
> bits_per_word in struct spi_transfer.
> I also wonder, which value to use for mode in my struct spi_board_info.
>
> Uli
>
>
> --
>
> ------- ROAD ...the handyPC Company - - -  ) ) )
>
> Uli Luckas
> Head of Software Development
>
> ROAD GmbH
> Bennigsenstr. 14 | 12159 Berlin | Germany
> fon: +49 (30) 230069 - 62 | fax: +49 (30) 230069 - 69
> url: www.road.de
>
> Amtsgericht Charlottenburg: HRB 96688 B
> Managing director: Hans-Peter Constien
>
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev
>



-- 
Andrey Yurovsky
cozybit Inc.



More information about the libertas-dev mailing list