blob: e94e620aeddc01a49b4f6073f54400ff343e66e2 [file] [log] [blame]
Robert P. J. Day100e9182011-05-27 16:04:03 -04001#ifndef LINUX_MMC_SH_MOBILE_SDHI_H
2#define LINUX_MMC_SH_MOBILE_SDHI_H
Guennadi Liakhovetski42051e82011-03-14 09:52:33 +01003
4#include <linux/types.h>
5
Guennadi Liakhovetski25958802011-05-11 16:51:15 +00006struct platform_device;
7struct tmio_mmc_data;
8
Simon Hormand5098cb2011-08-26 10:42:39 +02009#define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect"
10#define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard"
11#define SH_MOBILE_SDHI_IRQ_SDIO "sdio"
12
Guennadi Liakhovetski7f524212012-03-09 10:16:00 +010013/**
14 * struct sh_mobile_sdhi_ops - SDHI driver callbacks
15 * @cd_wakeup: trigger a card-detection run
16 */
17struct sh_mobile_sdhi_ops {
18 void (*cd_wakeup)(const struct platform_device *pdev);
19};
20
Guennadi Liakhovetski42051e82011-03-14 09:52:33 +010021struct sh_mobile_sdhi_info {
22 int dma_slave_tx;
23 int dma_slave_rx;
24 unsigned long tmio_flags;
25 unsigned long tmio_caps;
26 u32 tmio_ocr_mask; /* available MMC voltages */
Guennadi Liakhovetski58126c82012-02-09 22:57:10 +010027 unsigned int cd_gpio;
Guennadi Liakhovetski25958802011-05-11 16:51:15 +000028 struct tmio_mmc_data *pdata;
Guennadi Liakhovetski42051e82011-03-14 09:52:33 +010029 void (*set_pwr)(struct platform_device *pdev, int state);
30 int (*get_cd)(struct platform_device *pdev);
Bastian Hechte82b4ac2012-03-16 12:19:29 -040031
32 /* callbacks for board specific setup code */
Guennadi Liakhovetski7f524212012-03-09 10:16:00 +010033 int (*init)(struct platform_device *pdev,
34 const struct sh_mobile_sdhi_ops *ops);
Bastian Hechte82b4ac2012-03-16 12:19:29 -040035 void (*cleanup)(struct platform_device *pdev);
Guennadi Liakhovetski42051e82011-03-14 09:52:33 +010036};
37
Robert P. J. Day100e9182011-05-27 16:04:03 -040038#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */