aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada2020-02-14 16:40:23 +0900
committerPeng Fan2020-02-20 15:09:55 +0800
commita2b0221c9cb332415648c061c85f0ab1595c3429 (patch)
tree82102ee7a052f7b44ac8c1aadfdc62d11d74629f /drivers
parentf5df6aa1e64bdde7c26cf349dfd3a773f5c18e26 (diff)
mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr
Use {lower,upper}_32_bits() instead of the combination of cast and shift. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/sdhci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index b4713e7b9bb..fefe81016eb 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -153,9 +153,10 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
} else if (host->flags & (USE_ADMA | USE_ADMA64)) {
sdhci_prepare_adma_table(host, data);
- sdhci_writel(host, (u32)host->adma_addr, SDHCI_ADMA_ADDRESS);
+ sdhci_writel(host, lower_32_bits(host->adma_addr),
+ SDHCI_ADMA_ADDRESS);
if (host->flags & USE_ADMA64)
- sdhci_writel(host, (u64)host->adma_addr >> 32,
+ sdhci_writel(host, upper_32_bits(host->adma_addr),
SDHCI_ADMA_ADDRESS_HI);
}