summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-06-18 11:47:42 -0700
committerGary King <gking@nvidia.com>2010-06-18 16:05:21 -0700
commit756acb9a542dd8b89ebbb0bd3a02577204f30360 (patch)
treea59e51c0ad304c1a5c49fcf7f058491e151d29d0 /drivers
parent98e7f2cfa2fa0a62bf09e04a90719f04a8472588 (diff)
tegra-sdhci: disable polling for hosts with non-removable cards
hosts with non-removable cards should not need to specify MMC_CAP_POLLING; this causes additional exits from the CPU idle loop. add a field to the platform data to specify that the host is removable, and initialize card_present to true if the host is not removable Change-Id: I55d9c8295435deb522977b3e7380abc0f8f05721 Reviewed-on: http://git-master/r/2888 Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Tested-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-tegra.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 531d00f2a825..d49f457dda4c 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -279,11 +279,11 @@ skip_gpio_wp:
host->max_clk = clk_get_rate(host->clk);
host->clk_enable = true;
- if (host->gpio_wp != -1 && host->gpio_cd != -1)
+ if (host->gpio_wp != -1 && (host->gpio_cd != -1 || !plat->is_removable))
sdhost->ops = &tegra_sdhci_wp_cd_ops;
else if (host->gpio_wp != -1)
sdhost->ops = &tegra_sdhci_wp_ops;
- else if (host->gpio_cd != -1)
+ else if (host->gpio_cd != -1 || !plat->is_removable)
sdhost->ops = &tegra_sdhci_cd_ops;
else
sdhost->ops = &tegra_sdhci_ops;
@@ -302,6 +302,9 @@ skip_gpio_wp:
sdhost->version = SDHCI_SPEC_200;
#endif
+ if (!plat->is_removable)
+ host->card_present = true;
+
sdhost->data_width = plat->bus_width;
sdhost->dma_mask = DMA_BIT_MASK(32);
ret = sdhci_add_host(sdhost);