summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/sdio.c
diff options
context:
space:
mode:
authorPavan Kunapuli <pkunapuli@nvidia.com>2013-04-04 17:52:31 +0530
committerMrutyunjay Sawant <msawant@nvidia.com>2013-04-10 03:50:00 -0700
commitd93ba8bd5d993d51024571a25a2d9d1649752bbf (patch)
tree8c9f8c6d41c530a428023b1b98c09c66a334645e /drivers/mmc/core/sdio.c
parent18a8df49d7fc837cc805ef2b0601d3a301915060 (diff)
mmc: sdio: Register for device frequency scaling
If CONFIG_MMC_FREQ_SCALING is enabled, register for device frequency scaling. Bug 1238045 Change-Id: I11bb807a4658246b18fa41b4e59c63271c5c00f0 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/213013 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com> Tested-by: Naveen Kumar Arepalli <naveenk@nvidia.com> Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r--drivers/mmc/core/sdio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 451b2a404a48..497e1403bd79 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -828,6 +828,16 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
finish:
if (!oldcard)
host->card = card;
+
+#ifdef CONFIG_MMC_FREQ_SCALING
+ /*
+ * This implementation is still in experimental phase. So, don't fail
+ * enumeration even if dev freq init fails.
+ */
+ if (mmc_devfreq_init(host))
+ dev_info(mmc_dev(host),
+ "Device frequency scaling initialization failed %d\n", err);
+#endif
return 0;
remove:
@@ -855,6 +865,10 @@ static void mmc_sdio_remove(struct mmc_host *host)
}
}
+#ifdef CONFIG_MMC_FREQ_SCALING
+ mmc_devfreq_deinit(host);
+#endif
+
mmc_remove_card(host->card);
host->card = NULL;
}