diff options
author | yangbo lu <yangbo.lu@freescale.com> | 2015-11-24 21:05:37 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-12-22 05:32:11 -0500 |
commit | 1ef5e49e46b919052474d9b54a15debc79ff0133 (patch) | |
tree | 152a7b406c1a8b273324b6803fa5a0eb46b7f81b /drivers/mmc | |
parent | 447dc0d20a69ebd59f335a096528634a40ea55c0 (diff) |
mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version
A previous patch had removed esdhc_of_platform_init() by mistake.
static void esdhc_of_platform_init(struct sdhci_host *host)
{
u32 vvn;
vvn = in_be32(host->ioaddr + SDHCI_SLOT_INT_STATUS);
vvn = (vvn & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT;
if (vvn == VENDOR_V_22)
host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
if (vvn > VENDOR_V_22)
host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ;
}
This patch is used to fix it by add/remove some quirks according to
verdor version in probe.
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Fixes: f4932cfd22f1 ("mmc: sdhci-of-esdhc: support both BE and LE host controller")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-of-esdhc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 90e94a028a49..83b1226471c1 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c | |||
@@ -584,6 +584,8 @@ static int sdhci_esdhc_probe(struct platform_device *pdev) | |||
584 | { | 584 | { |
585 | struct sdhci_host *host; | 585 | struct sdhci_host *host; |
586 | struct device_node *np; | 586 | struct device_node *np; |
587 | struct sdhci_pltfm_host *pltfm_host; | ||
588 | struct sdhci_esdhc *esdhc; | ||
587 | int ret; | 589 | int ret; |
588 | 590 | ||
589 | np = pdev->dev.of_node; | 591 | np = pdev->dev.of_node; |
@@ -600,6 +602,14 @@ static int sdhci_esdhc_probe(struct platform_device *pdev) | |||
600 | 602 | ||
601 | sdhci_get_of_property(pdev); | 603 | sdhci_get_of_property(pdev); |
602 | 604 | ||
605 | pltfm_host = sdhci_priv(host); | ||
606 | esdhc = pltfm_host->priv; | ||
607 | if (esdhc->vendor_ver == VENDOR_V_22) | ||
608 | host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; | ||
609 | |||
610 | if (esdhc->vendor_ver > VENDOR_V_22) | ||
611 | host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; | ||
612 | |||
603 | if (of_device_is_compatible(np, "fsl,p5040-esdhc") || | 613 | if (of_device_is_compatible(np, "fsl,p5040-esdhc") || |
604 | of_device_is_compatible(np, "fsl,p5020-esdhc") || | 614 | of_device_is_compatible(np, "fsl,p5020-esdhc") || |
605 | of_device_is_compatible(np, "fsl,p4080-esdhc") || | 615 | of_device_is_compatible(np, "fsl,p4080-esdhc") || |