diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-08-10 06:34:18 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-08-13 11:09:38 -0400 |
commit | e05dd97c5c345bd1f6ce9f6fc242326a64191239 (patch) | |
tree | a3d700746bc2b5f809876bd7aa8c7c0ac93166ac /arch/arm/mach-at91/at91sam9rl_devices.c | |
parent | 19e4ab54e7f5fe46a3c931afa7e786f11d57b558 (diff) | |
parent | 4cf3326ab5f34a333a46c59d0d3783db9cef13bf (diff) |
Merge tag 'at91-for-next-soc' of git://github.com/at91linux/linux-at91 into at91/mci
AT91 SoC related code modifications: a cleanup in defconfigs and
a one liner in a board file.
The most important is the move to atmel-mci driver in AT91 SoC & boards.
The old at91_mci (marked as deprecated) will be removed in 3.7. So all
platform data for this old driver are erased and replace by information
needed by atmel-mci driver.
* tag 'at91-for-next-soc' of git://github.com/at91linux/linux-at91:
ARM: at91: add atmel-mci support for chips and boards which can use it
ARM: at91/defconfig: change the MCI driver to use in defconfigs
ARM: at91: set i2c_board_info.type to "ds1339" directly
ARM: at91/defconfig: Remove unaffected config option
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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 f09fff93217..ea4479e7c3f 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 | ||