mmc: omap_hsmmc: remove prepare/complete system suspend support.
[linux-block.git] / include / linux / platform_data / mmc-omap.h
CommitLineData
8777297b
KS
1/*
2 * MMC definitions for OMAP2
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
8777297b
KS
11#define OMAP_MMC_MAX_SLOTS 2
12
68f39e74
TL
13struct mmc_card;
14
8777297b 15struct omap_mmc_platform_data {
01971f65
DB
16 /* back-link to device */
17 struct device *dev;
abfbe5f7 18
d8874665 19 /* number of slots per controller */
8777297b 20 unsigned nr_slots:2;
0a4b53a2 21
8777297b
KS
22 /* set if your board has components or wiring that limits the
23 * maximum frequency on the MMC bus */
24 unsigned int max_freq;
25
26 /* switch the bus to a new slot */
db0fefc5 27 int (*switch_slot)(struct device *dev, int slot);
8777297b
KS
28 /* initialize board-specific MMC functionality, can be NULL if
29 * not supported */
db0fefc5
AH
30 int (*init)(struct device *dev);
31 void (*cleanup)(struct device *dev);
32 void (*shutdown)(struct device *dev);
0a4b53a2 33
1887bde3
DK
34 /* Return context loss count due to PM states changing */
35 int (*get_context_loss_count)(struct device *dev);
36
6ab8946f
KK
37 /* Integrating attributes from the omap_hwmod layer */
38 u8 controller_flags;
39
91a0b089 40 /* Register offset deviation */
41 u16 reg_offset;
42
8777297b 43 struct omap_mmc_slot_data {
d8874665 44
63509e3c
TL
45 /*
46 * 4/8 wires and any additional host capabilities
47 * need to OR'd all capabilities (ref. linux/mmc/host.h)
48 */
49 u8 wires; /* Used for the MMC driver on omap1 and 2420 */
50 u32 caps; /* Used for the MMC driver on 2430 and later */
6fdc75de 51 u32 pm_caps; /* PM capabilities of the mmc */
90c62bf0 52
d8874665
TL
53 /*
54 * nomux means "standard" muxing is wrong on this board, and
55 * that board-specific code handled it before common init logic.
56 */
57 unsigned nomux:1;
58
59 /* switch pin can be for card detect (default) or card cover */
60 unsigned cover:1;
61
d8874665
TL
62 /* use the internal clock */
63 unsigned internal_clock:1;
90c62bf0 64
23d99bb9
AH
65 /* nonremovable e.g. eMMC */
66 unsigned nonremovable:1;
67
dd498eff
DK
68 /* Try to sleep or power off when possible */
69 unsigned power_saving:1;
70
1df58db8
AH
71 /* If using power_saving and the MMC power is not to go off */
72 unsigned no_off:1;
73
b1c1df7a
B
74 /* eMMC does not handle power off when not in sleep state */
75 unsigned no_regulator_off_init:1;
76
e0eb2424
AH
77 /* Regulator off remapped to sleep */
78 unsigned vcc_aux_disable_is_sleep:1;
79
03e7e170 80 /* we can put the features above into this variable */
8287361a
LT
81#define MMC_OMAP7XX (1 << 3)
82#define MMC_OMAP15XX (1 << 4)
83#define MMC_OMAP16XX (1 << 5)
03e7e170 84 unsigned features;
85
90c62bf0
TL
86 int switch_pin; /* gpio (card detect) */
87 int gpio_wp; /* gpio (write protect) */
d8874665 88
db0fefc5
AH
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);
ce6f0016 93 void (*remux)(struct device *dev, int slot, int power_on);
db0fefc5
AH
94 /* Call back before enabling / disabling regulators */
95 void (*before_set_reg)(struct device *dev, int slot,
96 int power_on, int vdd);
97 /* Call back after enabling / disabling regulators */
98 void (*after_set_reg)(struct device *dev, int slot,
99 int power_on, int vdd);
4816858c
GI
100 /* if we have special card, init it using this callback */
101 void (*init_card)(struct mmc_card *card);
8777297b
KS
102
103 /* return MMC cover switch state, can be NULL if not supported.
104 *
105 * possible return values:
d8874665
TL
106 * 0 - closed
107 * 1 - open
8777297b 108 */
db0fefc5 109 int (*get_cover_state)(struct device *dev, int slot);
8777297b
KS
110
111 const char *name;
112 u32 ocr_mask;
0a4b53a2
TL
113
114 /* Card detection IRQs */
115 int card_detect_irq;
db0fefc5 116 int (*card_detect)(struct device *dev, int slot);
0a4b53a2
TL
117
118 unsigned int ban_openended:1;
119
8777297b
KS
120 } slots[OMAP_MMC_MAX_SLOTS];
121};