blob: 68927ae50845c73de623d14f87b00af368d3672a [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;
Guennadi Liakhovetski25958802011-05-11 16:51:15 +00007
Simon Hormand5098cb2011-08-26 10:42:39 +02008#define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect"
9#define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard"
10#define SH_MOBILE_SDHI_IRQ_SDIO "sdio"
11
Guennadi Liakhovetski7f524212012-03-09 10:16:00 +010012/**
13 * struct sh_mobile_sdhi_ops - SDHI driver callbacks
14 * @cd_wakeup: trigger a card-detection run
15 */
16struct sh_mobile_sdhi_ops {
17 void (*cd_wakeup)(const struct platform_device *pdev);
18};
19
Guennadi Liakhovetski42051e82011-03-14 09:52:33 +010020struct sh_mobile_sdhi_info {
21 int dma_slave_tx;
22 int dma_slave_rx;
23 unsigned long tmio_flags;
24 unsigned long tmio_caps;
Guennadi Liakhovetskid7d8d502012-05-23 11:05:33 +020025 unsigned long tmio_caps2;
Guennadi Liakhovetski42051e82011-03-14 09:52:33 +010026 u32 tmio_ocr_mask; /* available MMC voltages */
Guennadi Liakhovetski58126c82012-02-09 22:57:10 +010027 unsigned int cd_gpio;
Bastian Hechte82b4ac2012-03-16 12:19:29 -040028
29 /* callbacks for board specific setup code */
Guennadi Liakhovetski7f524212012-03-09 10:16:00 +010030 int (*init)(struct platform_device *pdev,
31 const struct sh_mobile_sdhi_ops *ops);
Bastian Hechte82b4ac2012-03-16 12:19:29 -040032 void (*cleanup)(struct platform_device *pdev);
Guennadi Liakhovetski42051e82011-03-14 09:52:33 +010033};
34
Robert P. J. Day100e9182011-05-27 16:04:03 -040035#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */