We have an IMX53 based platform running Android Gingerbread, Linux kernel 2.6.35.
I'm trying to force the mmc stack to detect and process the removal and insertion of an SDIO card via a software mechanism as opposed to a hardware mechanism.
It looked like the function mxc_mmc_force_detect was doing just that and would forcing the card detect handler to run and detect the presence/absence of the card. It does not appear to work as I expected.
void mxc_mmc_force_detect(int id)
struct sdhci_host *host;
if ((id < 0) || (id >= MXC_SDHCI_NUM))
host = mxc_fix_chips[id]->hosts;
When the function is called, mxc_fix_chips[id] is zero and so it simply returns at this point. Secondly host->detect_irq is non zero and so it would also return here.
So it looks like this only schedules the handler when in a certain state. Can anyone explain what this function does and when it should be called? Is this the appropriate function to achieve what I want or is there another way to do this?