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