WL1271 register power function with MMC device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WL1271 register power function with MMC device

1,183 Views
bdp42
Contributor IV

We have a custom iMX53 based platform running Android Gingerbread, Linux kernel 2.6.35 with a TiWi-BLE Wlan/Bluetooth device using the SDIO interface for WLAN.

We have a problem when the radio is being restarted where the OS loses communication with the radio.

It looks like the problem is caused by the fact that the power control initialisation in the platform-specific section is not being done correctly. The WL12xx porting guide

http://processors.wiki.ti.com/index.php/WL127x_Porting_Guide#Board_Initialization_file

has a section on power control and details how to register the power control function with the MMC device. Specifically the key piece of code is as follows:

static void wl12xx_init(int evm_id, int profile)

{

struct device *dev;

struct omap_mmc_platform_data *pdata;

dev = am335x_mmc[1].dev;

pdata->slots[0].set_power = wl12xx_set_power;

out:

return;

}

I have done a similar thing on our platform in the WL1271 driver. I dont think this is correct and the right approach is to do this in the board-specific code as specified in the porting guide. However the example above is TI/OMAP-specific and I'm unsure how to do this on the Freescale platform since the structures are different and the Freescale structures do no appear to support this in the same way.

Can anyone clarify if this is the right thing to do and how this is done on the Freescale platform?

Thanks,

Bruno

Labels (3)
0 Kudos
Reply
3 Replies

797 Views
EricNelson
Senior Contributor II

Hi Bruno,

That way (following TI's instructions) leads to disaster!

We wrote some notes about this a while back:

     http://boundarydevices.com/android-jellybean-on-i-mx6-with-no-disclaimers/#wifi

The gist of it is in the sdhci.c file, which expects to be able to toggle a GPIO through

the SDHCI registers.

     linux-imx6/sdhci.c at cdee0ec7fd5cdd21c205e76fea6398eea343eec0 · boundarydevices/linux-imx6 · GitHub

Since the i.MX5x and i.MX6x SDHCI controller doesn't support this, you need to allow a call-back

into platform-specific code to toggle the RESET pin on the WL1271.

0 Kudos
Reply

797 Views
bdp42
Contributor IV

Hi Eric,

This looks very useful. I will investigate and see how it goes. We have an older Android and kernel version but the principle is presumably the same.

Thanks,
Bruno

0 Kudos
Reply

797 Views
bdp42
Contributor IV

I've implemented this scheme but the problem is still there. My understanding is that I should see the set power function called at the correct time. The correct time being when the interface is configured up and down. However this is not happening and I still have the problem. There seems to some linkage missing between the SDIO/MMC stack and the low level set-power.

The Android and kernel version are older than the one used in the IMX6 but I believe I've implemented an equivalent functionality.

Bruno

0 Kudos
Reply