mmc: sdhci-of-esdhc: set proper dma mask for ls104x chips
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Wed, 4 Jul 2018 11:34:20 +0000 (14:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:38:11 +0000 (08:38 +0200)
commit58d402738d9fd6f9fbb779dd8e44be803f2f6cb1
tree02e1a4ed35975aaef2ffd1e3e87acf741b74d86c
parent49c90d012ab47625e0b41a1d8d49b3ce1ca8a5a7
mmc: sdhci-of-esdhc: set proper dma mask for ls104x chips

[ Upstream commit 5552d7ad596c3fea953f40fef74170ce0760c04d ]

SDHCI controller in ls1043a and ls1046a generate 40-bit wide addresses
when doing DMA. Make sure that the corresponding dma mask is correctly
configured.

Context: when enabling smmu on these chips the following problem is
encountered: the smmu input address size is 48 bits so the dma mappings
for sdhci end up 48-bit wide. However, on these chips sdhci only use
40-bits of that address size when doing dma.
So you end up with a 48-bit address translation in smmu but the device
generates transactions with clipped 40-bit addresses, thus smmu context
faults are triggered. Setting up the correct dma mask fixes this
situation.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-of-esdhc.c