aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/tmio_mmc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 69d98e3bf6ab..1a47221d01a4 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -756,10 +756,23 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
756 (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1; 756 (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1;
757} 757}
758 758
759static int tmio_mmc_get_cd(struct mmc_host *mmc)
760{
761 struct tmio_mmc_host *host = mmc_priv(mmc);
762 struct mfd_cell *cell = host->pdev->dev.platform_data;
763 struct tmio_mmc_data *pdata = cell->driver_data;
764
765 if (!pdata->get_cd)
766 return -ENOSYS;
767 else
768 return pdata->get_cd(host->pdev);
769}
770
759static const struct mmc_host_ops tmio_mmc_ops = { 771static const struct mmc_host_ops tmio_mmc_ops = {
760 .request = tmio_mmc_request, 772 .request = tmio_mmc_request,
761 .set_ios = tmio_mmc_set_ios, 773 .set_ios = tmio_mmc_set_ios,
762 .get_ro = tmio_mmc_get_ro, 774 .get_ro = tmio_mmc_get_ro,
775 .get_cd = tmio_mmc_get_cd,
763}; 776};
764 777
765#ifdef CONFIG_PM 778#ifdef CONFIG_PM