OSDN Git Service

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)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Jul 2018 09:21:45 +0000 (11:21 +0200)
commit5552d7ad596c3fea953f40fef74170ce0760c04d
treefbacb5d80846766beb8a4bf26518e59c9a20f48e
parentf01c3684cf048794dced60297c6fc4b805c6787c
mmc: sdhci-of-esdhc: set proper dma mask for ls104x chips

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>
drivers/mmc/host/sdhci-of-esdhc.c