[U-Boot] [PATCH] fsl_esdhc: fix PIO mode transfers

Ira W. Snyder iws at ovro.caltech.edu
Fri Dec 23 19:30:40 CET 2011


The pointer to the registers used to control the Freescale ESDHC MMC
controller is not initialized correctly when using PIO mode. This is
fixed by initializing the pointer in the same way as all other sites
within the driver.

Examining the commit history shows that this was broken at introduction
due to a code change in upstream U-Boot to support the mx51 processor
family.

Reported-by: Jim Lentz <JLentz at zhone.com>
Cc: Andy Fleming <afleming at freescale.com>
Cc: Kumar Gala <galak at kernel.crashing.org>
Signed-off-by: Ira W. Snyder <iws at ovro.caltech.edu>
---

I'm sending this as a new email with correct subject line so that patchwork
can find it. Also so that Andy Fleming and Kumar Gala see it. I've marked
the orginal patch (part of thread "fsl_esdhc.c bug") as "Superseded" in
patchwork.

Andy and Kumar, I've CC'd you because you committed the bulk of patches to
the drivers/mmc/fsl_esdhc.c driver in the past.

This was tested on a P2020COME board by forcing PIO mode in the config
file. This bug effects boards using P1_P2_RDB.h with CONFIG_P2020 set.

 drivers/mmc/fsl_esdhc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index ec953f0..b56ddc65 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -113,7 +113,8 @@ uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data *data)
 static void
 esdhc_pio_read_write(struct mmc *mmc, struct mmc_data *data)
 {
-	struct fsl_esdhc *regs = mmc->priv;
+	struct fsl_esdhc_cfg *cfg = mmc->priv;
+	struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
 	uint blocks;
 	char *buffer;
 	uint databuf;
-- 
1.7.3.4



More information about the U-Boot mailing list