aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/sh_mmcif.c12
-rw-r--r--include/linux/mmc/sh_mmcif.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 0f06b8002814..ddd09840520b 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -710,9 +710,21 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
710 host->bus_width = ios->bus_width; 710 host->bus_width = ios->bus_width;
711} 711}
712 712
713static int sh_mmcif_get_cd(struct mmc_host *mmc)
714{
715 struct sh_mmcif_host *host = mmc_priv(mmc);
716 struct sh_mmcif_plat_data *p = host->pd->dev.platform_data;
717
718 if (!p->get_cd)
719 return -ENOSYS;
720 else
721 return p->get_cd(host->pd);
722}
723
713static struct mmc_host_ops sh_mmcif_ops = { 724static struct mmc_host_ops sh_mmcif_ops = {
714 .request = sh_mmcif_request, 725 .request = sh_mmcif_request,
715 .set_ios = sh_mmcif_set_ios, 726 .set_ios = sh_mmcif_set_ios,
727 .get_cd = sh_mmcif_get_cd,
716}; 728};
717 729
718static void sh_mmcif_detect(struct mmc_host *mmc) 730static void sh_mmcif_detect(struct mmc_host *mmc)
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h
index d4a2ebbdab4b..d19e2114fd86 100644
--- a/include/linux/mmc/sh_mmcif.h
+++ b/include/linux/mmc/sh_mmcif.h
@@ -34,6 +34,7 @@
34struct sh_mmcif_plat_data { 34struct sh_mmcif_plat_data {
35 void (*set_pwr)(struct platform_device *pdev, int state); 35 void (*set_pwr)(struct platform_device *pdev, int state);
36 void (*down_pwr)(struct platform_device *pdev); 36 void (*down_pwr)(struct platform_device *pdev);
37 int (*get_cd)(struct platform_device *pdef);
37 u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ 38 u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */
38 unsigned long caps; 39 unsigned long caps;
39 u32 ocr; 40 u32 ocr;