Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220590
b: refs/heads/master
c: 998283e
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Hannemann authored and Samuel Ortiz committed Oct 28, 2010
1 parent adcef9c commit f0d193a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19ca7502c508595edfb963e5dbcf62854a926506
refs/heads/master: 998283e2e359249133f2f47db26669a55ff25c98
13 changes: 13 additions & 0 deletions trunk/drivers/mfd/sh_mobile_sdhi.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ static void sh_mobile_sdhi_set_pwr(struct platform_device *tmio, int state)
p->set_pwr(pdev, state);
}

static int sh_mobile_sdhi_get_cd(struct platform_device *tmio)
{
struct platform_device *pdev = to_platform_device(tmio->dev.parent);
struct sh_mobile_sdhi_info *p = pdev->dev.platform_data;

if (p && p->get_cd)
return p->get_cd(pdev);
else
return -ENOSYS;
}

static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
{
struct sh_mobile_sdhi *priv;
Expand Down Expand Up @@ -106,10 +117,12 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)

mmc_data->hclk = clk_get_rate(priv->clk);
mmc_data->set_pwr = sh_mobile_sdhi_set_pwr;
mmc_data->get_cd = sh_mobile_sdhi_get_cd;
mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED;
if (p) {
mmc_data->flags = p->tmio_flags;
mmc_data->ocr_mask = p->tmio_ocr_mask;
mmc_data->capabilities |= p->tmio_caps;
}

if (p && p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mfd/sh_mobile_sdhi.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ struct sh_mobile_sdhi_info {
int dma_slave_tx;
int dma_slave_rx;
unsigned long tmio_flags;
unsigned long tmio_caps;
u32 tmio_ocr_mask; /* available MMC voltages */
void (*set_pwr)(struct platform_device *pdev, int state);
int (*get_cd)(struct platform_device *pdev);
};

#endif /* __SH_MOBILE_SDHI_H__ */

0 comments on commit f0d193a

Please sign in to comment.