blob: b0fdaa9bd18567b92d30c5181a1243ae4c85773f [file] [log] [blame]
Sascha Hauerd96be872009-01-06 17:04:14 +01001#ifndef ASMARM_ARCH_MMC_H
2#define ASMARM_ARCH_MMC_H
3
Ulf Hansson8336bf62017-01-11 12:28:15 +01004#include <linux/interrupt.h>
Sascha Hauerd96be872009-01-06 17:04:14 +01005#include <linux/mmc/host.h>
6
7struct device;
8
9/* board specific SDHC data, optional.
10 * If not present, a writable card with 3,3V is assumed.
11 */
12struct imxmmc_platform_data {
13 /* Return values for the get_ro callback should be:
14 * 0 for a read/write card
15 * 1 for a read-only card
16 * -ENOSYS when not supported (equal to NULL callback)
17 * or a negative errno value when something bad happened
18 */
19 int (*get_ro)(struct device *);
20
21 /* board specific hook to (de)initialize the SD slot.
22 * The board code can call 'handler' on a card detection
23 * change giving data as argument.
24 */
25 int (*init)(struct device *dev, irq_handler_t handler, void *data);
26 void (*exit)(struct device *dev, void *data);
27
28 /* available voltages. If not given, assume
29 * MMC_VDD_32_33 | MMC_VDD_33_34
30 */
31 unsigned int ocr_avail;
32
33 /* adjust slot voltage */
34 void (*setpower)(struct device *, unsigned int vdd);
Eric BĂ©nard16b3bf82010-05-19 18:46:04 +020035
36 /* enable card detect using DAT3 */
37 int dat3_card_detect;
Sascha Hauerd96be872009-01-06 17:04:14 +010038};
39
40#endif