From: Ira W. Snyder Date: Fri, 16 Dec 2011 09:48:19 -0800 Subject: [PATCH] fsl_esdhc: fix PIO mode transfers Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The pointer to the registers used to control the Freescale MMC controller is not initialized correctly when using PIO mode. This is fixed by initializing the pointer identically to all other usage in 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 Signed-off-by: Ira W. Snyder --- Tested on the P2020COME board with PIO explicitly enabled via: #define CONFIG_SYS_FSL_ESDHC_USE_PIO 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