Dear all, Have any advice about these patchs for SDHC? Thanks and Best Regards Jerry Huang Beijing office, Freescale Semiconductor > -----Original Message----- > From: Huang Changming-R66093 > Sent: Friday, December 04, 2009 3:55 PM > To: linux-mmc@xxxxxxxxxxxxxxx > Cc: Huang Changming-R66093 > Subject: [PATCH 1/3] MMC/SD: power on before detecting card > > From: Jerry Huang <Chang-Ming.Huang@xxxxxxxxxxxxx> > > power on before detecting card. > > The driver will not get the right status when using the > callback function 'get_cd' to check if the card is present > because the power is not on. > Therefore, the controller must be power on before detecting > the card status. > > Signed-off-by: Jerry Huang <Chang-Ming.Huang@xxxxxxxxxxxxx> > --- > drivers/mmc/core/core.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > index 7dab2e5..7b3aee1 100644 > --- a/drivers/mmc/core/core.c > +++ b/drivers/mmc/core/core.c > @@ -1067,12 +1067,13 @@ void mmc_rescan(struct work_struct *work) > */ > mmc_bus_put(host); > > + mmc_power_up(host); > + > if (host->ops->get_cd && host->ops->get_cd(host) == 0) > goto out; > > mmc_claim_host(host); > > - mmc_power_up(host); > mmc_go_idle(host); > > mmc_send_if_cond(host, host->ocr_avail); > -- > 1.6.4 > > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html