diff options
author | Tom Rini <trini@konsulko.com> | 2019-02-10 08:11:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-02-10 08:11:53 -0500 |
commit | dbe70c7d4e3d5c705a98d82952e05a591efd0683 (patch) | |
tree | c0e3b72471772f0e7f922866ac680a0eed45da1e /drivers/mmc/tmio-common.c | |
parent | 151b8339ccd33428d249e75bd036bd7eb33c1ef6 (diff) | |
parent | e531c6731b697fc524b54697caebf235a4a69e8d (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-sh
- SD/MMC fixes and ext4 memory leak fix
Diffstat (limited to 'drivers/mmc/tmio-common.c')
-rw-r--r-- | drivers/mmc/tmio-common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c index 201492001f..2421915a07 100644 --- a/drivers/mmc/tmio-common.c +++ b/drivers/mmc/tmio-common.c @@ -347,12 +347,10 @@ static int tmio_sd_dma_xfer(struct udevice *dev, struct mmc_data *data) /* * The DMA READ completion flag position differs on Socionext * and Renesas SoCs. It is bit 20 on Socionext SoCs and using - * bit 17 is a hardware bug and forbidden. It is bit 17 on - * Renesas SoCs and bit 20 does not work on them. + * bit 17 is a hardware bug and forbidden. It is either bit 17 + * or bit 20 on Renesas SoCs, depending on SoC. */ - poll_flag = (priv->caps & TMIO_SD_CAP_RCAR) ? - TMIO_SD_DMA_INFO1_END_RD : - TMIO_SD_DMA_INFO1_END_RD2; + poll_flag = priv->read_poll_flag; tmp |= TMIO_SD_DMA_MODE_DIR_RD; } else { buf = (void *)data->src; @@ -369,6 +367,9 @@ static int tmio_sd_dma_xfer(struct udevice *dev, struct mmc_data *data) ret = tmio_sd_dma_wait_for_irq(dev, poll_flag, data->blocks); + if (poll_flag == TMIO_SD_DMA_INFO1_END_RD) + udelay(1); + __dma_unmap_single(dma_addr, len, dir); return ret; |