diff options
author | Tony Lindgren <tony@atomide.com> | 2008-12-10 20:37:16 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-12-10 20:37:16 -0500 |
commit | 652bcd8f72cc0cdf4499ce7d73990514e5e3e4b9 (patch) | |
tree | 58d67895f5dc621c529742b62152bbb8d6bbb5ce /arch/arm/mach-omap1/board-h2-mmc.c | |
parent | 2619bc327417f549f1c89d5ef9b4a4aa768f41a2 (diff) |
omap mmc: Remove broken MMC init code
Most of the omap1 MMC boards got broken by an earlier patch
138ab9f8321f67c71984ca43222efa71b0a0a0a9. If you look closely,
the MMC init funtions are pretty much just stubs.
Remove broken init code to make room for cleaner MMC init code.
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-h2-mmc.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2-mmc.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c index ab9ee5820c48..504ae881360f 100644 --- a/arch/arm/mach-omap1/board-h2-mmc.c +++ b/arch/arm/mach-omap1/board-h2-mmc.c | |||
@@ -15,91 +15,6 @@ | |||
15 | #include <mach/mmc.h> | 15 | #include <mach/mmc.h> |
16 | #include <mach/gpio.h> | 16 | #include <mach/gpio.h> |
17 | 17 | ||
18 | #ifdef CONFIG_MMC_OMAP | ||
19 | static int slot_cover_open; | ||
20 | static struct device *mmc_device; | ||
21 | |||
22 | static int h2_mmc_set_power(struct device *dev, int slot, int power_on, | ||
23 | int vdd) | ||
24 | { | ||
25 | #ifdef CONFIG_MMC_DEBUG | ||
26 | dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1, | ||
27 | power_on ? "on" : "off", vdd); | ||
28 | #endif | ||
29 | if (slot != 0) { | ||
30 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
31 | return -ENODEV; | ||
32 | } | ||
33 | |||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | static int h2_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode) | ||
38 | { | ||
39 | #ifdef CONFIG_MMC_DEBUG | ||
40 | dev_dbg(dev, "Set slot %d bus_mode %s\n", slot + 1, | ||
41 | bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull"); | ||
42 | #endif | ||
43 | if (slot != 0) { | ||
44 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
45 | return -ENODEV; | ||
46 | } | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static int h2_mmc_get_cover_state(struct device *dev, int slot) | ||
52 | { | ||
53 | BUG_ON(slot != 0); | ||
54 | |||
55 | return slot_cover_open; | ||
56 | } | ||
57 | |||
58 | void h2_mmc_slot_cover_handler(void *arg, int state) | ||
59 | { | ||
60 | if (mmc_device == NULL) | ||
61 | return; | ||
62 | |||
63 | slot_cover_open = state; | ||
64 | omap_mmc_notify_cover_event(mmc_device, 0, state); | ||
65 | } | ||
66 | |||
67 | static int h2_mmc_late_init(struct device *dev) | ||
68 | { | ||
69 | int ret = 0; | ||
70 | |||
71 | mmc_device = dev; | ||
72 | |||
73 | return ret; | ||
74 | } | ||
75 | |||
76 | static void h2_mmc_cleanup(struct device *dev) | ||
77 | { | ||
78 | } | ||
79 | |||
80 | static struct omap_mmc_platform_data h2_mmc_data = { | ||
81 | .nr_slots = 1, | ||
82 | .switch_slot = NULL, | ||
83 | .init = h2_mmc_late_init, | ||
84 | .cleanup = h2_mmc_cleanup, | ||
85 | .slots[0] = { | ||
86 | .set_power = h2_mmc_set_power, | ||
87 | .set_bus_mode = h2_mmc_set_bus_mode, | ||
88 | .get_ro = NULL, | ||
89 | .get_cover_state = h2_mmc_get_cover_state, | ||
90 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | | ||
91 | MMC_VDD_32_33 | MMC_VDD_33_34, | ||
92 | .name = "mmcblk", | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | void __init h2_mmc_init(void) | ||
97 | { | ||
98 | omap_set_mmc_info(1, &h2_mmc_data); | ||
99 | } | ||
100 | |||
101 | #else | ||
102 | |||
103 | void __init h2_mmc_init(void) | 18 | void __init h2_mmc_init(void) |
104 | { | 19 | { |
105 | } | 20 | } |
@@ -107,4 +22,3 @@ void __init h2_mmc_init(void) | |||
107 | void h2_mmc_slot_cover_handler(void *arg, int state) | 22 | void h2_mmc_slot_cover_handler(void *arg, int state) |
108 | { | 23 | { |
109 | } | 24 | } |
110 | #endif | ||