From: Marek Vasut Date: Tue, 2 Oct 2018 22:46:24 +0000 (+0200) Subject: mmc: tmio: Limit DMA to 32bit on R-Car Gen3 X-Git-Tag: v2018.11-rc2~8^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=beced53a74a32087651150b0c2a8a95eaddd53c2;p=oweals%2Fu-boot.git mmc: tmio: Limit DMA to 32bit on R-Car Gen3 The internal DMAC on Gen3 is 32bit only, limit the DMA address range to 32bit. Signed-off-by: Marek Vasut Cc: Masahiro Yamada --- diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c index 6b21941991..138de59470 100644 --- a/drivers/mmc/tmio-common.c +++ b/drivers/mmc/tmio-common.c @@ -379,6 +379,12 @@ static bool tmio_sd_addr_is_dmaable(const char *src) if (!IS_ALIGNED(addr, TMIO_SD_DMA_MINALIGN)) return false; +#if defined(CONFIG_RCAR_GEN3) + /* Gen3 DMA has 32bit limit */ + if (addr >> 32) + return false; +#endif + #if defined(CONFIG_ARCH_UNIPHIER) && !defined(CONFIG_ARM64) && \ defined(CONFIG_SPL_BUILD) /*