diff options
-rw-r--r-- | drivers/mfd/sh_mobile_sdhi.c | 13 | ||||
-rw-r--r-- | include/linux/mfd/sh_mobile_sdhi.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mfd/sh_mobile_sdhi.c b/drivers/mfd/sh_mobile_sdhi.c index 49b4d069cbf9..01d83a41d570 100644 --- a/drivers/mfd/sh_mobile_sdhi.c +++ b/drivers/mfd/sh_mobile_sdhi.c | |||
@@ -65,6 +65,17 @@ static void sh_mobile_sdhi_set_pwr(struct platform_device *tmio, int state) | |||
65 | p->set_pwr(pdev, state); | 65 | p->set_pwr(pdev, state); |
66 | } | 66 | } |
67 | 67 | ||
68 | static int sh_mobile_sdhi_get_cd(struct platform_device *tmio) | ||
69 | { | ||
70 | struct platform_device *pdev = to_platform_device(tmio->dev.parent); | ||
71 | struct sh_mobile_sdhi_info *p = pdev->dev.platform_data; | ||
72 | |||
73 | if (p && p->get_cd) | ||
74 | return p->get_cd(pdev); | ||
75 | else | ||
76 | return -ENOSYS; | ||
77 | } | ||
78 | |||
68 | static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev) | 79 | static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev) |
69 | { | 80 | { |
70 | struct sh_mobile_sdhi *priv; | 81 | struct sh_mobile_sdhi *priv; |
@@ -106,10 +117,12 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev) | |||
106 | 117 | ||
107 | mmc_data->hclk = clk_get_rate(priv->clk); | 118 | mmc_data->hclk = clk_get_rate(priv->clk); |
108 | mmc_data->set_pwr = sh_mobile_sdhi_set_pwr; | 119 | mmc_data->set_pwr = sh_mobile_sdhi_set_pwr; |
120 | mmc_data->get_cd = sh_mobile_sdhi_get_cd; | ||
109 | mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; | 121 | mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; |
110 | if (p) { | 122 | if (p) { |
111 | mmc_data->flags = p->tmio_flags; | 123 | mmc_data->flags = p->tmio_flags; |
112 | mmc_data->ocr_mask = p->tmio_ocr_mask; | 124 | mmc_data->ocr_mask = p->tmio_ocr_mask; |
125 | mmc_data->capabilities |= p->tmio_caps; | ||
113 | } | 126 | } |
114 | 127 | ||
115 | if (p && p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) { | 128 | if (p && p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) { |
diff --git a/include/linux/mfd/sh_mobile_sdhi.h b/include/linux/mfd/sh_mobile_sdhi.h index 49067802a6d7..c981b959760f 100644 --- a/include/linux/mfd/sh_mobile_sdhi.h +++ b/include/linux/mfd/sh_mobile_sdhi.h | |||
@@ -7,8 +7,10 @@ struct sh_mobile_sdhi_info { | |||
7 | int dma_slave_tx; | 7 | int dma_slave_tx; |
8 | int dma_slave_rx; | 8 | int dma_slave_rx; |
9 | unsigned long tmio_flags; | 9 | unsigned long tmio_flags; |
10 | unsigned long tmio_caps; | ||
10 | u32 tmio_ocr_mask; /* available MMC voltages */ | 11 | u32 tmio_ocr_mask; /* available MMC voltages */ |
11 | void (*set_pwr)(struct platform_device *pdev, int state); | 12 | void (*set_pwr)(struct platform_device *pdev, int state); |
13 | int (*get_cd)(struct platform_device *pdev); | ||
12 | }; | 14 | }; |
13 | 15 | ||
14 | #endif /* __SH_MOBILE_SDHI_H__ */ | 16 | #endif /* __SH_MOBILE_SDHI_H__ */ |