0001
0002
0003
0004
0005
0006
0007
0008 #define OMAP_MMC_MAX_SLOTS 2
0009
0010 struct mmc_card;
0011
0012 struct omap_mmc_platform_data {
0013
0014 struct device *dev;
0015
0016
0017 unsigned nr_slots:2;
0018
0019
0020
0021 unsigned int max_freq;
0022
0023
0024 int (*switch_slot)(struct device *dev, int slot);
0025
0026
0027 int (*init)(struct device *dev);
0028 void (*cleanup)(struct device *dev);
0029 void (*shutdown)(struct device *dev);
0030
0031
0032 int (*get_context_loss_count)(struct device *dev);
0033
0034
0035 u8 controller_flags;
0036
0037
0038 u16 reg_offset;
0039
0040 struct omap_mmc_slot_data {
0041
0042
0043
0044
0045
0046 u8 wires;
0047 u32 caps;
0048 u32 pm_caps;
0049
0050
0051
0052
0053
0054 unsigned nomux:1;
0055
0056
0057 unsigned cover:1;
0058
0059
0060 unsigned internal_clock:1;
0061
0062
0063 unsigned nonremovable:1;
0064
0065
0066 unsigned power_saving:1;
0067
0068
0069 unsigned no_off:1;
0070
0071
0072 unsigned no_regulator_off_init:1;
0073
0074
0075 unsigned vcc_aux_disable_is_sleep:1;
0076
0077
0078 #define MMC_OMAP7XX (1 << 3)
0079 #define MMC_OMAP15XX (1 << 4)
0080 #define MMC_OMAP16XX (1 << 5)
0081 unsigned features;
0082
0083 int switch_pin;
0084 int gpio_wp;
0085
0086 int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);
0087 int (*set_power)(struct device *dev, int slot,
0088 int power_on, int vdd);
0089 int (*get_ro)(struct device *dev, int slot);
0090 void (*remux)(struct device *dev, int slot, int power_on);
0091
0092 void (*before_set_reg)(struct device *dev, int slot,
0093 int power_on, int vdd);
0094
0095 void (*after_set_reg)(struct device *dev, int slot,
0096 int power_on, int vdd);
0097
0098 void (*init_card)(struct mmc_card *card);
0099
0100
0101
0102
0103
0104
0105
0106 int (*get_cover_state)(struct device *dev, int slot);
0107
0108 const char *name;
0109 u32 ocr_mask;
0110
0111
0112 int (*card_detect)(struct device *dev, int slot);
0113
0114 unsigned int ban_openended:1;
0115
0116 } slots[OMAP_MMC_MAX_SLOTS];
0117 };
0118
0119 extern void omap_mmc_notify_cover_event(struct device *dev, int slot,
0120 int is_closed);