mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 22:20:45 +00:00
mmc: sdhci: combine the Host controller v3.0 feature into one condition
It doesn't need to seperate the condition. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
f37b7e4f6c
commit
3fd0a9ba8c
1 changed files with 7 additions and 10 deletions
|
@ -572,9 +572,16 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
|
||||||
cfg->voltages |= host->voltages;
|
cfg->voltages |= host->voltages;
|
||||||
|
|
||||||
cfg->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
|
cfg->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
|
||||||
|
|
||||||
|
/* Since Host Controller Version3.0 */
|
||||||
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
|
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
|
||||||
if (!(caps & SDHCI_CAN_DO_8BIT))
|
if (!(caps & SDHCI_CAN_DO_8BIT))
|
||||||
cfg->host_caps &= ~MMC_MODE_8BIT;
|
cfg->host_caps &= ~MMC_MODE_8BIT;
|
||||||
|
|
||||||
|
/* Find out whether clock multiplier is supported */
|
||||||
|
caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
|
||||||
|
host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
|
||||||
|
SDHCI_CLOCK_MUL_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (host->host_caps)
|
if (host->host_caps)
|
||||||
|
@ -582,16 +589,6 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
|
||||||
|
|
||||||
cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
|
cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
|
||||||
|
|
||||||
/*
|
|
||||||
* In case of Host Controller v3.00, find out whether clock
|
|
||||||
* multiplier is supported.
|
|
||||||
*/
|
|
||||||
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
|
|
||||||
caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
|
|
||||||
host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
|
|
||||||
SDHCI_CLOCK_MUL_SHIFT;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue