diff options
author | Jaehoon Chung | 2020-03-27 13:08:00 +0900 |
---|---|---|
committer | Matthias Brugger | 2020-05-12 11:00:45 +0200 |
commit | fac8bfd4f52612fceb2d9784c93ed8f147f209c3 (patch) | |
tree | 37c35b93f30859b8279b3e4d92b12cbc72199123 /drivers | |
parent | 0ed0db985abaa95a326ebfd268785e0b310d9d5d (diff) |
mmc: sdhci: use phys2bus macro when dma address is accessed
Use phys2bus macro when dma address is accessed.
Some targets need to use pyhs2bus macro. (e.g, RPI4)
After applied it, SDMA mode can be used.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/sdhci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 372dc0a8201..480fad37ed8 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -16,6 +16,7 @@ #include <sdhci.h> #include <dm.h> #include <linux/dma-mapping.h> +#include <phys2bus.h> static void sdhci_reset(struct sdhci_host *host, u8 mask) { @@ -150,7 +151,8 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data, mmc_get_dma_dir(data)); if (host->flags & USE_SDMA) { - sdhci_writel(host, host->start_addr, SDHCI_DMA_ADDRESS); + sdhci_writel(host, phys_to_bus((ulong)host->start_addr), + SDHCI_DMA_ADDRESS); } else if (host->flags & (USE_ADMA | USE_ADMA64)) { sdhci_prepare_adma_table(host, data); @@ -204,7 +206,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data) start_addr &= ~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1); start_addr += SDHCI_DEFAULT_BOUNDARY_SIZE; - sdhci_writel(host, start_addr, + sdhci_writel(host, phys_to_bus((ulong)start_addr), SDHCI_DMA_ADDRESS); } } |