mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-21 22:21:36 +00:00
mmc: sdhci: Use upper/lower_32_bits macros
Instead of recasting and shifting use macros which are designed for taking upper/lower 32bit value from 64bit variable. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
620bb46ead
commit
b5a3387dc1
1 changed files with 4 additions and 4 deletions
|
@ -748,9 +748,9 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
|
||||||
"sdhci-caps-mask", 0);
|
"sdhci-caps-mask", 0);
|
||||||
dt_caps = dev_read_u64_default(host->mmc->dev,
|
dt_caps = dev_read_u64_default(host->mmc->dev,
|
||||||
"sdhci-caps", 0);
|
"sdhci-caps", 0);
|
||||||
caps = ~(u32)dt_caps_mask &
|
caps = ~lower_32_bits(dt_caps_mask) &
|
||||||
sdhci_readl(host, SDHCI_CAPABILITIES);
|
sdhci_readl(host, SDHCI_CAPABILITIES);
|
||||||
caps |= (u32)dt_caps;
|
caps |= lower_32_bits(dt_caps);
|
||||||
#else
|
#else
|
||||||
caps = sdhci_readl(host, SDHCI_CAPABILITIES);
|
caps = sdhci_readl(host, SDHCI_CAPABILITIES);
|
||||||
#endif
|
#endif
|
||||||
|
@ -793,9 +793,9 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
|
||||||
/* Check whether the clock multiplier is supported or not */
|
/* Check whether the clock multiplier is supported or not */
|
||||||
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
|
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
|
||||||
#if CONFIG_IS_ENABLED(DM_MMC)
|
#if CONFIG_IS_ENABLED(DM_MMC)
|
||||||
caps_1 = ~(u32)(dt_caps_mask >> 32) &
|
caps_1 = ~upper_32_bits(dt_caps_mask) &
|
||||||
sdhci_readl(host, SDHCI_CAPABILITIES_1);
|
sdhci_readl(host, SDHCI_CAPABILITIES_1);
|
||||||
caps_1 |= (u32)(dt_caps >> 32);
|
caps_1 |= upper_32_bits(dt_caps);
|
||||||
#else
|
#else
|
||||||
caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
|
caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue