mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr 58/268158/2
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 14 Feb 2020 07:40:23 +0000 (16:40 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 16 Dec 2021 16:18:05 +0000 (17:18 +0100)
Use {lower,upper}_32_bits() instead of the combination of cast
and shift.

Change-Id: I619fb7c4fef77e029f9b8c7d861ef4004e01cfd4
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/sdhci.c

index 82a6393464f19e44c7c7f9744efb568e88506895..be7ec0aba8b9d83289a12d3ccfc2bacb14f895a4 100644 (file)
@@ -154,9 +154,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);
        }