I am trying to configure a WiFi module at init time. In the initialization, I am configuring some pins and would also possibly like to configure the pwm that generated a wakeup clock at bootup ( the WiFi module is on mmc0, and an eMMC flash is on mmc1). The SOC is an AM3358 device
What I currently see from the dmesg entries is that it appears that the mc0 configuration is failing at init time. Please see the below excerpt
mmc_sdio_init_card mmc_send_io_op_cond -> err
mmc_sdio_init_card err : -110
===== mmc_attach_sdio mmc_sdio_init_card -> err ==========
mmc0: error -110 whilst initialising SDIO card ---> This is the initialization of the WiFi module
In the WiFi module init routine I am currently asserting the reset pin and also enabling power to a regulator. An additional step that I may need to do is to automatically enable the pwm that generates a needed clock ( this pwm can be configured from userspace, but by then the init routine has run.
An additional complication is that I cannot seem to figure out how to get the mmc_rescan_try_freq() method to run once the bootup process is complete. An alternate path that I was thinking of is to :
1) Build the driver as a module
2) write script to initialize all the required gpios and pwm and then once this is done, insmod the module.
However when I do this, the mmc framework does not appear to recognize that the WiFi modue device has been added to the mmc/sdio bus ( I never see mmc_rescan is run and the device is not detected by the mmc framework )
The above situation leads to the following questions
1) Is there a way to force the mmc_rescan functionality to be run from userspace. Is there a particular entry that I could place in my mmc dts entry that would indicate to the drivers that this mmc device needs to be scanned for on a periodic basis.
2) I think (??) if I could get thru the mmc_sdio_init_card() method, this would allow the hsmmc_probe method to run etc, etc. I am not sure what the best way is to approach/solve this particular issue.
Another approach I was thinking of taking is to see if there is a way to completely configure the dts entry of the associated pwm device so that (hopefully ??) this clock signal would be configured correctly by the the time the WiFi module init routine is run ( again, I am not sure if this is the right way to go, but ...)
I can attach the dmesg log file if this would be helpful. Any input would be appreciated
Thanks
Victor