1
2
3
4
5
6
7
8
9
10
11#define OMAP_MMC_MAX_SLOTS 2
12
13struct mmc_card;
14
15struct omap_mmc_platform_data {
16
17 struct device *dev;
18
19
20 unsigned nr_slots:2;
21
22
23
24 unsigned int max_freq;
25
26
27 int (*switch_slot)(struct device *dev, int slot);
28
29
30 int (*init)(struct device *dev);
31 void (*cleanup)(struct device *dev);
32 void (*shutdown)(struct device *dev);
33
34
35 int (*suspend)(struct device *dev, int slot);
36 int (*resume)(struct device *dev, int slot);
37
38
39 int (*get_context_loss_count)(struct device *dev);
40
41
42 u8 controller_flags;
43
44
45 u16 reg_offset;
46
47 struct omap_mmc_slot_data {
48
49
50
51
52
53 u8 wires;
54 u32 caps;
55 u32 pm_caps;
56
57
58
59
60
61 unsigned nomux:1;
62
63
64 unsigned cover:1;
65
66
67 unsigned internal_clock:1;
68
69
70 unsigned nonremovable:1;
71
72
73 unsigned power_saving:1;
74
75
76 unsigned no_off:1;
77
78
79 unsigned no_regulator_off_init:1;
80
81
82 unsigned vcc_aux_disable_is_sleep:1;
83
84
85#define MMC_OMAP7XX (1 << 3)
86#define MMC_OMAP15XX (1 << 4)
87#define MMC_OMAP16XX (1 << 5)
88 unsigned features;
89
90 int switch_pin;
91 int gpio_wp;
92
93 int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);
94 int (*set_power)(struct device *dev, int slot,
95 int power_on, int vdd);
96 int (*get_ro)(struct device *dev, int slot);
97 void (*remux)(struct device *dev, int slot, int power_on);
98
99 void (*before_set_reg)(struct device *dev, int slot,
100 int power_on, int vdd);
101
102 void (*after_set_reg)(struct device *dev, int slot,
103 int power_on, int vdd);
104
105 void (*init_card)(struct mmc_card *card);
106
107
108
109
110
111
112
113 int (*get_cover_state)(struct device *dev, int slot);
114
115 const char *name;
116 u32 ocr_mask;
117
118
119 int card_detect_irq;
120 int (*card_detect)(struct device *dev, int slot);
121
122 unsigned int ban_openended:1;
123
124 } slots[OMAP_MMC_MAX_SLOTS];
125};
126