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 (*get_context_loss_count)(struct device *dev);
36
37
38 u8 controller_flags;
39
40
41 u16 reg_offset;
42
43 struct omap_mmc_slot_data {
44
45
46
47
48
49 u8 wires;
50 u32 caps;
51 u32 pm_caps;
52
53
54
55
56
57 unsigned nomux:1;
58
59
60 unsigned cover:1;
61
62
63 unsigned internal_clock:1;
64
65
66 unsigned nonremovable:1;
67
68
69 unsigned power_saving:1;
70
71
72 unsigned no_off:1;
73
74
75 unsigned no_regulator_off_init:1;
76
77
78 unsigned vcc_aux_disable_is_sleep:1;
79
80
81#define MMC_OMAP7XX (1 << 3)
82#define MMC_OMAP15XX (1 << 4)
83#define MMC_OMAP16XX (1 << 5)
84 unsigned features;
85
86 int switch_pin;
87 int gpio_wp;
88
89 int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);
90 int (*set_power)(struct device *dev, int slot,
91 int power_on, int vdd);
92 int (*get_ro)(struct device *dev, int slot);
93 void (*remux)(struct device *dev, int slot, int power_on);
94
95 void (*before_set_reg)(struct device *dev, int slot,
96 int power_on, int vdd);
97
98 void (*after_set_reg)(struct device *dev, int slot,
99 int power_on, int vdd);
100
101 void (*init_card)(struct mmc_card *card);
102
103
104
105
106
107
108
109 int (*get_cover_state)(struct device *dev, int slot);
110
111 const char *name;
112 u32 ocr_mask;
113
114
115 int card_detect_irq;
116 int (*card_detect)(struct device *dev, int slot);
117
118 unsigned int ban_openended:1;
119
120 } slots[OMAP_MMC_MAX_SLOTS];
121};
122