How-to use the sdio driver?

Dongas dongas86 at gmail.com
Tue Jul 14 11:20:50 EDT 2009


2009/7/14 Lars Holowko <Lars.Holowko at lantronix.com>:
>
>>> Thanks Dan,
>>>
>>> For the hint concerning debug and the MMC bus. I don't see anything
>>> happening there with my wifi card.
>>>
>>> One source of the problem could be that the MMC slot seems to get
>>> scanned only at boot up. It only recognizes a SD card when it is
>>> already plugged in when the kernel gets booted but not if I plug it
> in later.
>>>
>>> By that time the libertas module is not loaded yet. But when I
>>> configure libertas_sdio to be linked statically, I don't see any
>>> difference either...
>>
>> Which WiFi card are you using?
>> Probably the WiFi card was not properly detected by your SDIO
> controller.
>> Make sure the configuration of your GPIO pin for card detection is
> right.
>> BTW, have you tried pre-plug in the WiFi card before power up the
> board?
>>
>
> I am using a Marvell 88W8686 development board. It has a SD-card style
> connector so I would assume that I won't have to modify any additional
> GPIOs because it would use the same GPIOs as a SD-card in the same slot,
> right? Pre-plugging the WiFi card does not work (no output other then
> that the libertas driver was registered) - as opposed to the SD-card.

There should be a line of message similar as follows shown if your
SDIO card is detected and initialized successful.
mmc0: new SDIO card at address 001
As Dan said , turning on the MMC core debug option may give you more
useful information.
(Make sure the console log level is 8 to display all debug messages)

>>> I also added a couple of printks in
>>> drives/mmc/core/sdio_bus.c:sdio_bus_event and
>>> drives/mmc/core/sdio_bus.c:sdio_bus_probe but they never seem to get
>>> called either - neither with the SD card nor the wireless board. Do
>>> you know who is supposed to call those probe functions?
>
>> sdio_bus_probe will be called by MMC/SDIO Stack once a SDIO function
> and driver are matched on SDIO Bus.
>
> May you point me where this sdio bus scanning/matching is happening? Is
> it mmc_rescan in drivers/mmc/core/core.c ?
The mmc_rescan function will scan the card in slot, for example a SDIO
card,  and then register it into kernel with its function found after
a few basic initialization operations.
After that, when you insmod libertas module, there's a sdio
function(wifi) driver registerred into kernel.
The sdio function and function driver will be matched via some way
predefined for sdio bus.
Please refer to the sdio_bus_type structure in sdio_bus.c for more details.

Regards
Dongas



More information about the libertas-dev mailing list