]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
mmc: sdhci: Support polling mode.
authorAnubhav Jain <anubhavj@nvidia.com>
Wed, 3 Aug 2016 09:37:43 +0000 (15:07 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Tue, 9 Aug 2016 19:18:24 +0000 (12:18 -0700)
-Added support to parse the broken-cd property
using sdhci_tegra_dt_parse_pdata function.

-Removed the mmc_of_parse function call from probe,
which was added as a part of Bug 1765751

Bug 200224838

Change-Id: I30a875ecb0b0802e40215893d12bbebdb6797733
Signed-off-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1196753
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
drivers/mmc/host/sdhci-tegra.c

index 7612b8ba5afe50b9d85a98d593509554a68b6408..42f23d52a7e65f05956e9ee4a578466f15a6898a 100644 (file)
@@ -5369,9 +5369,10 @@ static struct tegra_sdhci_platform_data *sdhci_tegra_dt_parse_pdata(
                                                struct platform_device *pdev)
 {
        int val;
-       int ret;
+       int ret, len;
        struct tegra_sdhci_platform_data *plat;
        struct device_node *np = pdev->dev.of_node;
+       struct sdhci_host *host = platform_get_drvdata(pdev);
        u32 bus_width;
        int i;
        char label[12];
@@ -5491,6 +5492,8 @@ static struct tegra_sdhci_platform_data *sdhci_tegra_dt_parse_pdata(
        plat->bcm_sdio_suppress_kso_dump =
                of_property_read_bool(np, "nvidia,bcm-sdio-suppress-kso-dump");
 
+       if (of_find_property(np, "broken-cd", &len))
+               host->mmc->caps |= MMC_CAP_NEEDS_POLL;
        return plat;
 }
 
@@ -6159,7 +6162,6 @@ static int sdhci_tegra_probe(struct platform_device *pdev)
        tegra_host->dbg_cfg.clk_ungated =
                plat->disable_clock_gate;
 #endif
-       mmc_of_parse(host->mmc);
        return 0;
 
 err_cd_irq_req: