From 992c7d59293d136bd356d79791444cf5c90d24aa Mon Sep 17 00:00:00 2001 From: Anubhav Jain Date: Wed, 3 Aug 2016 15:07:43 +0530 Subject: [PATCH] mmc: sdhci: Support polling mode. -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 Reviewed-on: http://git-master/r/1196753 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro Reviewed-by: Winnie Hsu --- drivers/mmc/host/sdhci-tegra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 7612b8ba5af..42f23d52a7e 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -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: -- 2.39.2