2010-03-25 02:59:54     如何在凑27上將libertas_spi加入uclinux內

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-03-25 02:59:54     如何在凑27上將libertas_spi加入uclinux內

Gordon Yu (TAIWAN)

Message: 87680   

 

各位好

 

目前要將marvell 8686加到BF527-ezkit上,使用的是spi介面,由koop上找到使用SDIO的方式,也找到一個網站如下:

 

  wireless.kernel.org/en/users/Drivers/libertas

 

網站上有說明如何加上 Marvell GSPI,但是在source code內找不到libertas_spi.h,不知該如何去新增?

 

我使用的uclinux image為 uClinux-dist-2009R1.1-RC4。

TranslateQuoteReplyEditDelete

 

 

2010-03-26 04:29:49     Re: 如何在凑27上將libertas_spi加入uclinux內

Yi Li (CHINA)

Message: 87731   

 

Gordon,

 

You need to use SVN trunk kernel - I can see "linux-kernel/include/linux/spi/libertas_spi.h" on svn trunk.

 

-Yi

QuoteReplyEditDelete

 

 

2010-03-29 04:05:09     Re: 如何在凑27上將libertas_spi加入uclinux內

Gordon Yu (TAIWAN)

Message: 87792   

 

Yi Li

 

您好,我要到那去下載 SVN truck kernel ?

 

因為是初學者,所以有很多知識還不懂,還請您多多指導~

 

謝謝

 

Gordon

TranslateQuoteReplyEditDelete

 

 

2010-03-30 05:55:57     Re: 如何在凑27上將libertas_spi加入uclinux內

Gordon Yu (TAIWAN)

Message: 87850   

 

Hi Yi Li

 

I use "svn" to download the source code. and compiler it. Now I can get the libertas_spi.ko,

 

but when I use the module, I can't get WiFi module, I run the command below

 

root:>modprobe libertas

 

root:>modprobe libertas_spi

 

but nothing happen, I can't find my wifi interface by "iwconfig"

 

Can you teach me what file do I need to modify?

TranslateQuoteReplyEditDelete

 

 

2010-03-31 00:04:23     Re: 如何在凑27上將libertas_spi加入uclinux內

Sonic Zhang (CHINA)

Message: 87879   

 

Did you install the libertas firmware to roofs?

 

Please refer to https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:wifi_over_sdio&s[]=libertas

QuoteReplyEditDelete

 

 

2010-03-31 11:12:45     Re: 如何在凑27上將libertas_spi加入uclinux內

Gordon Yu (TAIWAN)

Message: 87927   

 

Hi Sonic

 

I put the bin file gspi8686.bin and gspi_hlp.bin to rofms/lib/firmware and romfs/lib/firmware/libertas.

 

 

 

Gordon

TranslateQuoteReplyEditDelete

 

 

2010-04-01 00:18:48     Re: 如何在凑27上將libertas_spi加入uclinux內

Sonic Zhang (CHINA)

Message: 87946   

 

We don't have gspi8686.bin and gspi_hlp.bin. So, we have never tested it.

QuoteReplyEditDelete

 

 

2010-04-01 03:55:25     Re: 如何在凑27上將libertas_spi加入uclinux內

Gordon Yu (TAIWAN)

Message: 87968   

 

Hi Sonic

 

Do you ever implement the libertas_spi for Marvell 8686 ?

 

Do you have me to test the librertas_spi ? I can send the bin files to you ?

 

Gordon

TranslateQuoteReplyEditDelete

 

 

2010-04-01 04:13:12     Re: 如何在凑27上將libertas_spi加入uclinux內

Sonic Zhang (CHINA)

Message: 87969   

 

We don't have the marvell 8686 SPI hardware either. So, we haven't implemented and tested this driver.

QuoteReplyEditDelete

 

 

2010-04-01 04:13:16     Re: 如何在凑27上將libertas_spi加入uclinux內

Yi Li (CHINA)

Message: 87970   

 

Gordon,

 

We don't have the 8686-spi hardware to test.

 

Maybe you did not load the firmware correctly? see:   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:hotplug#firmware

 

-Yi

QuoteReplyEditDelete

 

 

2010-04-01 22:34:23     Re: 如何在凑27上將libertas_spi加入uclinux內

Gordon Yu (TAIWAN)

Message: 87998   

 

Hi all

 

I modify the file ezkit.c at linux-2.6.x/arch/blackfin/mach-bf527/board/, I add below :

 

static int spi1_libertas_setup(struct spi_device *spi)

{

    spi->bits_per_word = 16;

    spi_setup(spi);

    return 0;

}

 

static struct libertas_spi_platform_data libertas_spi_platform_data_info =

{

    .use_dummy_writes = 0,

    .setup = spi1_libertas_setup,

};

 

static struct spi_board_info bfin_spi_board_info[] __initdata = {

 

{

          .modalias        = "libertas_spi",

          .max_speed_hz    = 45000000,

          .bus_num        = 0,

          .chip_select    = 3,

          .platform_data    = &libertas_spi_platform_data_info,

          .mode        = SPI_MODE_0,

    },

 

}

 

and

 

#include <linux/spi/libertas_spi.h>

 

and

 

I use the bf527-ezkit to test it.

 

Now I can get two error message when I run the driver,

 

root:/>modprobe libertas

root:/>modprobe libertas_spi

 

libertas_spi : Libertas SPI driver

libertas : Can't read bus mode register.

libertas_spi : probe of spi0.2 failed with error -5

 

 

 

1. How do I set the demo board switch ?

2. How do I can read bus mode register?

3. The error -5, How do I to fix?

 

Thank you!

 

Gordon

TranslateQuoteReplyEditDelete

 

 

2010-04-01 22:38:20     Re: 如何在凑27上將libertas_spi加入uclinux內

Gordon Yu (TAIWAN)

Message: 87999   

 

Hi Yi

 

I had been setting the firmware load support.

 

Gordon

Attachments

    Outcomes