Commit b17b4ab8 authored by Stefan Wahren's avatar Stefan Wahren Committed by Ulf Hansson

mmc: sdhci-iproc: define MMC caps in platform data

This patch moves the definition of the MMC capabilities
from the probe function into iproc platform data. After
that we are able to add support for another platform more
easily.
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Suggested-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Acked-by: default avatarScott Branden <sbranden@broadcom.com>
Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 1ac109dd
...@@ -26,6 +26,7 @@ struct sdhci_iproc_data { ...@@ -26,6 +26,7 @@ struct sdhci_iproc_data {
const struct sdhci_pltfm_data *pdata; const struct sdhci_pltfm_data *pdata;
u32 caps; u32 caps;
u32 caps1; u32 caps1;
u32 mmc_caps;
}; };
struct sdhci_iproc_host { struct sdhci_iproc_host {
...@@ -165,6 +166,7 @@ static const struct sdhci_iproc_data iproc_data = { ...@@ -165,6 +166,7 @@ static const struct sdhci_iproc_data iproc_data = {
.pdata = &sdhci_iproc_pltfm_data, .pdata = &sdhci_iproc_pltfm_data,
.caps = 0x05E90000, .caps = 0x05E90000,
.caps1 = 0x00000064, .caps1 = 0x00000064,
.mmc_caps = MMC_CAP_1_8V_DDR,
}; };
static const struct of_device_id sdhci_iproc_of_match[] = { static const struct of_device_id sdhci_iproc_of_match[] = {
...@@ -199,8 +201,7 @@ static int sdhci_iproc_probe(struct platform_device *pdev) ...@@ -199,8 +201,7 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
mmc_of_parse(host->mmc); mmc_of_parse(host->mmc);
sdhci_get_of_property(pdev); sdhci_get_of_property(pdev);
/* Enable EMMC 1/8V DDR capable */ host->mmc->caps |= iproc_host->data->mmc_caps;
host->mmc->caps |= MMC_CAP_1_8V_DDR;
pltfm_host->clk = devm_clk_get(&pdev->dev, NULL); pltfm_host->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pltfm_host->clk)) { if (IS_ERR(pltfm_host->clk)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment