diff options
author | Ludovic Desroches <ludovic.desroches@atmel.com> | 2012-05-21 06:23:27 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-07-02 12:03:01 -0400 |
commit | 4cf3326ab5f34a333a46c59d0d3783db9cef13bf (patch) | |
tree | 4d8b5f494f0c99b2f261b6145c91cbc97f492795 /arch/arm/mach-at91/at91sam9rl_devices.c | |
parent | 24f5c4b6e6f2933eb22979283db6174f378d9b36 (diff) |
ARM: at91: add atmel-mci support for chips and boards which can use it
Since atmel-mci driver supports all atmel mci versions,
use it instead of the deprecated at91_mci driver.
Platform data and all related configuration are removed.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
[nicolas.ferre@atmel.com: remove at91_mci platform data]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 9c0b1481a9a..7359472f276 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -161,9 +161,9 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {} | |||
161 | * MMC / SD | 161 | * MMC / SD |
162 | * -------------------------------------------------------------------- */ | 162 | * -------------------------------------------------------------------- */ |
163 | 163 | ||
164 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) | 164 | #if IS_ENABLED(CONFIG_MMC_ATMELMCI) |
165 | static u64 mmc_dmamask = DMA_BIT_MASK(32); | 165 | static u64 mmc_dmamask = DMA_BIT_MASK(32); |
166 | static struct at91_mmc_data mmc_data; | 166 | static struct mci_platform_data mmc_data; |
167 | 167 | ||
168 | static struct resource mmc_resources[] = { | 168 | static struct resource mmc_resources[] = { |
169 | [0] = { | 169 | [0] = { |
@@ -179,7 +179,7 @@ static struct resource mmc_resources[] = { | |||
179 | }; | 179 | }; |
180 | 180 | ||
181 | static struct platform_device at91sam9rl_mmc_device = { | 181 | static struct platform_device at91sam9rl_mmc_device = { |
182 | .name = "at91_mci", | 182 | .name = "atmel_mci", |
183 | .id = -1, | 183 | .id = -1, |
184 | .dev = { | 184 | .dev = { |
185 | .dma_mask = &mmc_dmamask, | 185 | .dma_mask = &mmc_dmamask, |
@@ -190,40 +190,40 @@ static struct platform_device at91sam9rl_mmc_device = { | |||
190 | .num_resources = ARRAY_SIZE(mmc_resources), | 190 | .num_resources = ARRAY_SIZE(mmc_resources), |
191 | }; | 191 | }; |
192 | 192 | ||
193 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | 193 | void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) |
194 | { | 194 | { |
195 | if (!data) | 195 | if (!data) |
196 | return; | 196 | return; |
197 | 197 | ||
198 | /* input/irq */ | 198 | if (data->slot[0].bus_width) { |
199 | if (gpio_is_valid(data->det_pin)) { | 199 | /* input/irq */ |
200 | at91_set_gpio_input(data->det_pin, 1); | 200 | if (gpio_is_valid(data->slot[0].detect_pin)) { |
201 | at91_set_deglitch(data->det_pin, 1); | 201 | at91_set_gpio_input(data->slot[0].detect_pin, 1); |
202 | } | 202 | at91_set_deglitch(data->slot[0].detect_pin, 1); |
203 | if (gpio_is_valid(data->wp_pin)) | 203 | } |
204 | at91_set_gpio_input(data->wp_pin, 1); | 204 | if (gpio_is_valid(data->slot[0].wp_pin)) |
205 | if (gpio_is_valid(data->vcc_pin)) | 205 | at91_set_gpio_input(data->slot[0].wp_pin, 1); |
206 | at91_set_gpio_output(data->vcc_pin, 0); | 206 | |
207 | 207 | /* CLK */ | |
208 | /* CLK */ | 208 | at91_set_A_periph(AT91_PIN_PA2, 0); |
209 | at91_set_A_periph(AT91_PIN_PA2, 0); | 209 | |
210 | 210 | /* CMD */ | |
211 | /* CMD */ | 211 | at91_set_A_periph(AT91_PIN_PA1, 1); |
212 | at91_set_A_periph(AT91_PIN_PA1, 1); | 212 | |
213 | 213 | /* DAT0, maybe DAT1..DAT3 */ | |
214 | /* DAT0, maybe DAT1..DAT3 */ | 214 | at91_set_A_periph(AT91_PIN_PA0, 1); |
215 | at91_set_A_periph(AT91_PIN_PA0, 1); | 215 | if (data->slot[0].bus_width == 4) { |
216 | if (data->wire4) { | 216 | at91_set_A_periph(AT91_PIN_PA3, 1); |
217 | at91_set_A_periph(AT91_PIN_PA3, 1); | 217 | at91_set_A_periph(AT91_PIN_PA4, 1); |
218 | at91_set_A_periph(AT91_PIN_PA4, 1); | 218 | at91_set_A_periph(AT91_PIN_PA5, 1); |
219 | at91_set_A_periph(AT91_PIN_PA5, 1); | 219 | } |
220 | |||
221 | mmc_data = *data; | ||
222 | platform_device_register(&at91sam9rl_mmc_device); | ||
220 | } | 223 | } |
221 | |||
222 | mmc_data = *data; | ||
223 | platform_device_register(&at91sam9rl_mmc_device); | ||
224 | } | 224 | } |
225 | #else | 225 | #else |
226 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | 226 | void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) {} |
227 | #endif | 227 | #endif |
228 | 228 | ||
229 | 229 | ||