Message ID | 1385961953-17077-1-git-send-email-Haijun.Zhang@freescale.com |
---|---|
State | Changes Requested |
Delegated to: | Pantelis Antoniou |
Headers | show |
Hi Haijun, On Dec 2, 2013, at 7:25 AM, Haijun Zhang wrote: > Card detection pin is ineffective on T4240QDS. > This workaround force sdhc driver scan and initialize the card regardless > of whether the card is inserted. if no card is in the slot, the error message > "card is not inserted" will be prompted. > > Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com> > --- > drivers/mmc/fsl_esdhc.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c > index e3cd0c7..e330379 100644 > --- a/drivers/mmc/fsl_esdhc.c > +++ b/drivers/mmc/fsl_esdhc.c > @@ -500,6 +500,10 @@ static int esdhc_getcd(struct mmc *mmc) > struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; > int timeout = 1000; > > +/* Card detecting pin is not functional on T4240QDS */ > +#if defined(CONFIG_T4240QDS) > + return 1; > +#endif Ugh, I don't like that much. How about a CONFIG_SYS_FSL_ESDHC_BROKEN_CD instead? We need to do the same for the following fragment in esdhc_xfertyp() #if defined(CONFIG_MX53) || defined(CONFIG_T4240QDS) if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION) xfertyp |= XFERTYP_CMDTYP_ABORT; #endif CONFIG_SYS_FSL_ESDHC_STOP_ABORT > while (!(esdhc_read32(®s->prsstat) & PRSSTAT_CINS) && --timeout) > udelay(1000); > > -- > 1.8.4 > > Regards -- Pantelis P.S. Add me to the CC list on the next version of the patch.
Hi all On Sun, Dec 8, 2013 at 12:46 PM, Pantelis Antoniou <pantelis.antoniou@gmail.com> wrote: > Hi Haijun, > > On Dec 2, 2013, at 7:25 AM, Haijun Zhang wrote: > >> Card detection pin is ineffective on T4240QDS. >> This workaround force sdhc driver scan and initialize the card regardless >> of whether the card is inserted. if no card is in the slot, the error message >> "card is not inserted" will be prompted. >> >> Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com> >> --- >> drivers/mmc/fsl_esdhc.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c >> index e3cd0c7..e330379 100644 >> --- a/drivers/mmc/fsl_esdhc.c >> +++ b/drivers/mmc/fsl_esdhc.c >> @@ -500,6 +500,10 @@ static int esdhc_getcd(struct mmc *mmc) >> struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; >> int timeout = 1000; >> >> +/* Card detecting pin is not functional on T4240QDS */ >> +#if defined(CONFIG_T4240QDS) >> + return 1; >> +#endif > > Ugh, I don't like that much. > > How about a CONFIG_SYS_FSL_ESDHC_BROKEN_CD instead? > I suggest to don't use any define but flags. Michael > We need to do the same for the following fragment in esdhc_xfertyp() > > #if defined(CONFIG_MX53) || defined(CONFIG_T4240QDS) > if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION) > xfertyp |= XFERTYP_CMDTYP_ABORT; > #endif > > CONFIG_SYS_FSL_ESDHC_STOP_ABORT > >> while (!(esdhc_read32(®s->prsstat) & PRSSTAT_CINS) && --timeout) >> udelay(1000); >> >> -- >> 1.8.4 >> >> > > Regards > > -- Pantelis > > P.S. Add me to the CC list on the next version of the patch. > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index e3cd0c7..e330379 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -500,6 +500,10 @@ static int esdhc_getcd(struct mmc *mmc) struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; int timeout = 1000; +/* Card detecting pin is not functional on T4240QDS */ +#if defined(CONFIG_T4240QDS) + return 1; +#endif while (!(esdhc_read32(®s->prsstat) & PRSSTAT_CINS) && --timeout) udelay(1000);
Card detection pin is ineffective on T4240QDS. This workaround force sdhc driver scan and initialize the card regardless of whether the card is inserted. if no card is in the slot, the error message "card is not inserted" will be prompted. Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com> --- drivers/mmc/fsl_esdhc.c | 4 ++++ 1 file changed, 4 insertions(+)