diff options
author | Adrian Hunter <adrian.hunter@nokia.com> | 2010-02-15 13:03:34 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-15 13:03:34 -0500 |
commit | 68ff04231ce9128d400f47762ae3c921be79cd49 (patch) | |
tree | ce0c321726d2df6239feeab1ddf145f5d0a549f9 /arch/arm/mach-omap2/hsmmc.c | |
parent | d02a900b5952597b6beebd709d92ab392fa3005a (diff) |
omap: Rename hsmmc symbols to reflect independence from twl4030
hsmmc.[ch] no longer has any dependency on twl4030
and variable names should be renamed to reflect that.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/hsmmc.c')
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index df1cf7273317..2ba0d55c323d 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -26,20 +26,20 @@ static u16 control_devconf1_offset; | |||
26 | 26 | ||
27 | #define HSMMC_NAME_LEN 9 | 27 | #define HSMMC_NAME_LEN 9 |
28 | 28 | ||
29 | static struct twl_mmc_controller { | 29 | static struct hsmmc_controller { |
30 | char name[HSMMC_NAME_LEN + 1]; | 30 | char name[HSMMC_NAME_LEN + 1]; |
31 | } hsmmc[OMAP34XX_NR_MMC]; | 31 | } hsmmc[OMAP34XX_NR_MMC]; |
32 | 32 | ||
33 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) | 33 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) |
34 | 34 | ||
35 | static int twl4030_mmc_get_context_loss(struct device *dev) | 35 | static int hsmmc_get_context_loss(struct device *dev) |
36 | { | 36 | { |
37 | /* FIXME: PM DPS not implemented yet */ | 37 | /* FIXME: PM DPS not implemented yet */ |
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
40 | 40 | ||
41 | #else | 41 | #else |
42 | #define twl4030_mmc_get_context_loss NULL | 42 | #define hsmmc_get_context_loss NULL |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | static void hsmmc1_before_set_reg(struct device *dev, int slot, | 45 | static void hsmmc1_before_set_reg(struct device *dev, int slot, |
@@ -135,9 +135,9 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot, | |||
135 | 135 | ||
136 | static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; | 136 | static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; |
137 | 137 | ||
138 | void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | 138 | void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) |
139 | { | 139 | { |
140 | struct twl4030_hsmmc_info *c; | 140 | struct omap2_hsmmc_info *c; |
141 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); | 141 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); |
142 | int i; | 142 | int i; |
143 | 143 | ||
@@ -150,7 +150,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | for (c = controllers; c->mmc; c++) { | 152 | for (c = controllers; c->mmc; c++) { |
153 | struct twl_mmc_controller *twl = hsmmc + c->mmc - 1; | 153 | struct hsmmc_controller *hc = hsmmc + c->mmc - 1; |
154 | struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1]; | 154 | struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1]; |
155 | 155 | ||
156 | if (!c->mmc || c->mmc > nr_hsmmc) { | 156 | if (!c->mmc || c->mmc > nr_hsmmc) { |
@@ -162,25 +162,25 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
162 | continue; | 162 | continue; |
163 | } | 163 | } |
164 | 164 | ||
165 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); | 165 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), |
166 | GFP_KERNEL); | ||
166 | if (!mmc) { | 167 | if (!mmc) { |
167 | pr_err("Cannot allocate memory for mmc device!\n"); | 168 | pr_err("Cannot allocate memory for mmc device!\n"); |
168 | goto done; | 169 | goto done; |
169 | } | 170 | } |
170 | 171 | ||
171 | if (c->name) | 172 | if (c->name) |
172 | strncpy(twl->name, c->name, HSMMC_NAME_LEN); | 173 | strncpy(hc->name, c->name, HSMMC_NAME_LEN); |
173 | else | 174 | else |
174 | snprintf(twl->name, ARRAY_SIZE(twl->name), | 175 | snprintf(hc->name, ARRAY_SIZE(hc->name), |
175 | "mmc%islot%i", c->mmc, 1); | 176 | "mmc%islot%i", c->mmc, 1); |
176 | mmc->slots[0].name = twl->name; | 177 | mmc->slots[0].name = hc->name; |
177 | mmc->nr_slots = 1; | 178 | mmc->nr_slots = 1; |
178 | mmc->slots[0].wires = c->wires; | 179 | mmc->slots[0].wires = c->wires; |
179 | mmc->slots[0].internal_clock = !c->ext_clock; | 180 | mmc->slots[0].internal_clock = !c->ext_clock; |
180 | mmc->dma_mask = 0xffffffff; | 181 | mmc->dma_mask = 0xffffffff; |
181 | 182 | ||
182 | mmc->get_context_loss_count = | 183 | mmc->get_context_loss_count = hsmmc_get_context_loss; |
183 | twl4030_mmc_get_context_loss; | ||
184 | 184 | ||
185 | mmc->slots[0].switch_pin = c->gpio_cd; | 185 | mmc->slots[0].switch_pin = c->gpio_cd; |
186 | mmc->slots[0].gpio_wp = c->gpio_wp; | 186 | mmc->slots[0].gpio_wp = c->gpio_wp; |