Message ID | 1445625991-5343-2-git-send-email-marex@denx.de |
---|---|
State | Accepted, archived |
Delegated to: | Andreas Bießmann |
Headers | show |
On 23.10.15 20:46, Marek Vasut wrote: > After silencing the prints which were generated when reconfiguring the > clock of the SD/MMC bus, surprisingly, the driver stopped working such > that every attempt to use the SD/MMC bus caused the CPU to get totally > stuck hard. It turns out that the prints generated a short delay, which > was necessary for the CPU to reconfigure the clock without getting stuck. > Thus, this patch adds a short delay after the clock configuration instead. > > Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com> > --- > drivers/mmc/gen_atmel_mci.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c > index 2815e57..8b05fcd 100644 > --- a/drivers/mmc/gen_atmel_mci.c > +++ b/drivers/mmc/gen_atmel_mci.c > @@ -113,6 +113,8 @@ static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen) > if (mmc->card_caps & mmc->cfg->host_caps & MMC_MODE_HS) > writel(MMCI_BIT(HSMODE), &mci->cfg); > > + udelay(50); > + > initialized = 1; > } > >
Dear Marek Vasut, Marek Vasut <marex@denx.de> writes: >After silencing the prints which were generated when reconfiguring the >clock of the SD/MMC bus, surprisingly, the driver stopped working such >that every attempt to use the SD/MMC bus caused the CPU to get totally >stuck hard. It turns out that the prints generated a short delay, which >was necessary for the CPU to reconfigure the clock without getting stuck. >Thus, this patch adds a short delay after the clock configuration instead. > >Signed-off-by: Marek Vasut <marex@denx.de> >Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com> >--- > drivers/mmc/gen_atmel_mci.c | 2 ++ > 1 file changed, 2 insertions(+) applied to u-boot-atmel/master, thanks! Best regards, Andreas Bießmann
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index 2815e57..8b05fcd 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -113,6 +113,8 @@ static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen) if (mmc->card_caps & mmc->cfg->host_caps & MMC_MODE_HS) writel(MMCI_BIT(HSMODE), &mci->cfg); + udelay(50); + initialized = 1; }
After silencing the prints which were generated when reconfiguring the clock of the SD/MMC bus, surprisingly, the driver stopped working such that every attempt to use the SD/MMC bus caused the CPU to get totally stuck hard. It turns out that the prints generated a short delay, which was necessary for the CPU to reconfigure the clock without getting stuck. Thus, this patch adds a short delay after the clock configuration instead. Signed-off-by: Marek Vasut <marex@denx.de> --- drivers/mmc/gen_atmel_mci.c | 2 ++ 1 file changed, 2 insertions(+)