diff options
Diffstat (limited to 'arch')
21 files changed, 172 insertions, 41 deletions
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 747b9dedab88..dc8b40783d94 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -377,7 +377,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
377 | * -------------------------------------------------------------------- */ | 377 | * -------------------------------------------------------------------- */ |
378 | 378 | ||
379 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 379 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
380 | static struct at91_nand_data nand_data; | 380 | static struct atmel_nand_data nand_data; |
381 | 381 | ||
382 | #define NAND_BASE AT91_CHIPSELECT_3 | 382 | #define NAND_BASE AT91_CHIPSELECT_3 |
383 | 383 | ||
@@ -395,7 +395,7 @@ static struct resource nand_resources[] = { | |||
395 | }; | 395 | }; |
396 | 396 | ||
397 | static struct platform_device at91cap9_nand_device = { | 397 | static struct platform_device at91cap9_nand_device = { |
398 | .name = "at91_nand", | 398 | .name = "atmel_nand", |
399 | .id = -1, | 399 | .id = -1, |
400 | .dev = { | 400 | .dev = { |
401 | .platform_data = &nand_data, | 401 | .platform_data = &nand_data, |
@@ -404,7 +404,7 @@ static struct platform_device at91cap9_nand_device = { | |||
404 | .num_resources = ARRAY_SIZE(nand_resources), | 404 | .num_resources = ARRAY_SIZE(nand_resources), |
405 | }; | 405 | }; |
406 | 406 | ||
407 | void __init at91_add_device_nand(struct at91_nand_data *data) | 407 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
408 | { | 408 | { |
409 | unsigned long csa, mode; | 409 | unsigned long csa, mode; |
410 | 410 | ||
@@ -445,7 +445,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
445 | platform_device_register(&at91cap9_nand_device); | 445 | platform_device_register(&at91cap9_nand_device); |
446 | } | 446 | } |
447 | #else | 447 | #else |
448 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 448 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
449 | #endif | 449 | #endif |
450 | 450 | ||
451 | 451 | ||
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index de19bee83f75..8ced9bc82099 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -369,7 +369,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
369 | * -------------------------------------------------------------------- */ | 369 | * -------------------------------------------------------------------- */ |
370 | 370 | ||
371 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 371 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
372 | static struct at91_nand_data nand_data; | 372 | static struct atmel_nand_data nand_data; |
373 | 373 | ||
374 | #define NAND_BASE AT91_CHIPSELECT_3 | 374 | #define NAND_BASE AT91_CHIPSELECT_3 |
375 | 375 | ||
@@ -382,7 +382,7 @@ static struct resource nand_resources[] = { | |||
382 | }; | 382 | }; |
383 | 383 | ||
384 | static struct platform_device at91rm9200_nand_device = { | 384 | static struct platform_device at91rm9200_nand_device = { |
385 | .name = "at91_nand", | 385 | .name = "atmel_nand", |
386 | .id = -1, | 386 | .id = -1, |
387 | .dev = { | 387 | .dev = { |
388 | .platform_data = &nand_data, | 388 | .platform_data = &nand_data, |
@@ -391,7 +391,7 @@ static struct platform_device at91rm9200_nand_device = { | |||
391 | .num_resources = ARRAY_SIZE(nand_resources), | 391 | .num_resources = ARRAY_SIZE(nand_resources), |
392 | }; | 392 | }; |
393 | 393 | ||
394 | void __init at91_add_device_nand(struct at91_nand_data *data) | 394 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
395 | { | 395 | { |
396 | unsigned int csa; | 396 | unsigned int csa; |
397 | 397 | ||
@@ -429,7 +429,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
429 | platform_device_register(&at91rm9200_nand_device); | 429 | platform_device_register(&at91rm9200_nand_device); |
430 | } | 430 | } |
431 | #else | 431 | #else |
432 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 432 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
433 | #endif | 433 | #endif |
434 | 434 | ||
435 | 435 | ||
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 86cba4ac29b1..cae5f52f1278 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -284,7 +284,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
284 | * -------------------------------------------------------------------- */ | 284 | * -------------------------------------------------------------------- */ |
285 | 285 | ||
286 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 286 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
287 | static struct at91_nand_data nand_data; | 287 | static struct atmel_nand_data nand_data; |
288 | 288 | ||
289 | #define NAND_BASE AT91_CHIPSELECT_3 | 289 | #define NAND_BASE AT91_CHIPSELECT_3 |
290 | 290 | ||
@@ -302,7 +302,7 @@ static struct resource nand_resources[] = { | |||
302 | }; | 302 | }; |
303 | 303 | ||
304 | static struct platform_device at91sam9260_nand_device = { | 304 | static struct platform_device at91sam9260_nand_device = { |
305 | .name = "at91_nand", | 305 | .name = "atmel_nand", |
306 | .id = -1, | 306 | .id = -1, |
307 | .dev = { | 307 | .dev = { |
308 | .platform_data = &nand_data, | 308 | .platform_data = &nand_data, |
@@ -311,7 +311,7 @@ static struct platform_device at91sam9260_nand_device = { | |||
311 | .num_resources = ARRAY_SIZE(nand_resources), | 311 | .num_resources = ARRAY_SIZE(nand_resources), |
312 | }; | 312 | }; |
313 | 313 | ||
314 | void __init at91_add_device_nand(struct at91_nand_data *data) | 314 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
315 | { | 315 | { |
316 | unsigned long csa, mode; | 316 | unsigned long csa, mode; |
317 | 317 | ||
@@ -373,7 +373,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
373 | platform_device_register(&at91sam9260_nand_device); | 373 | platform_device_register(&at91sam9260_nand_device); |
374 | } | 374 | } |
375 | #else | 375 | #else |
376 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 376 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
377 | #endif | 377 | #endif |
378 | 378 | ||
379 | 379 | ||
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index ec1891375dfb..483d436af22d 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -199,7 +199,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
199 | * -------------------------------------------------------------------- */ | 199 | * -------------------------------------------------------------------- */ |
200 | 200 | ||
201 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 201 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
202 | static struct at91_nand_data nand_data; | 202 | static struct atmel_nand_data nand_data; |
203 | 203 | ||
204 | #define NAND_BASE AT91_CHIPSELECT_3 | 204 | #define NAND_BASE AT91_CHIPSELECT_3 |
205 | 205 | ||
@@ -211,8 +211,8 @@ static struct resource nand_resources[] = { | |||
211 | } | 211 | } |
212 | }; | 212 | }; |
213 | 213 | ||
214 | static struct platform_device at91_nand_device = { | 214 | static struct platform_device atmel_nand_device = { |
215 | .name = "at91_nand", | 215 | .name = "atmel_nand", |
216 | .id = -1, | 216 | .id = -1, |
217 | .dev = { | 217 | .dev = { |
218 | .platform_data = &nand_data, | 218 | .platform_data = &nand_data, |
@@ -221,7 +221,7 @@ static struct platform_device at91_nand_device = { | |||
221 | .num_resources = ARRAY_SIZE(nand_resources), | 221 | .num_resources = ARRAY_SIZE(nand_resources), |
222 | }; | 222 | }; |
223 | 223 | ||
224 | void __init at91_add_device_nand(struct at91_nand_data *data) | 224 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
225 | { | 225 | { |
226 | unsigned long csa, mode; | 226 | unsigned long csa, mode; |
227 | 227 | ||
@@ -262,11 +262,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
262 | at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ | 262 | at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ |
263 | 263 | ||
264 | nand_data = *data; | 264 | nand_data = *data; |
265 | platform_device_register(&at91_nand_device); | 265 | platform_device_register(&atmel_nand_device); |
266 | } | 266 | } |
267 | 267 | ||
268 | #else | 268 | #else |
269 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 269 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
270 | #endif | 270 | #endif |
271 | 271 | ||
272 | 272 | ||
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 8a81f76f0200..9762b15f658a 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -353,7 +353,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
353 | * -------------------------------------------------------------------- */ | 353 | * -------------------------------------------------------------------- */ |
354 | 354 | ||
355 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 355 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
356 | static struct at91_nand_data nand_data; | 356 | static struct atmel_nand_data nand_data; |
357 | 357 | ||
358 | #define NAND_BASE AT91_CHIPSELECT_3 | 358 | #define NAND_BASE AT91_CHIPSELECT_3 |
359 | 359 | ||
@@ -371,7 +371,7 @@ static struct resource nand_resources[] = { | |||
371 | }; | 371 | }; |
372 | 372 | ||
373 | static struct platform_device at91sam9263_nand_device = { | 373 | static struct platform_device at91sam9263_nand_device = { |
374 | .name = "at91_nand", | 374 | .name = "atmel_nand", |
375 | .id = -1, | 375 | .id = -1, |
376 | .dev = { | 376 | .dev = { |
377 | .platform_data = &nand_data, | 377 | .platform_data = &nand_data, |
@@ -380,7 +380,7 @@ static struct platform_device at91sam9263_nand_device = { | |||
380 | .num_resources = ARRAY_SIZE(nand_resources), | 380 | .num_resources = ARRAY_SIZE(nand_resources), |
381 | }; | 381 | }; |
382 | 382 | ||
383 | void __init at91_add_device_nand(struct at91_nand_data *data) | 383 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
384 | { | 384 | { |
385 | unsigned long csa, mode; | 385 | unsigned long csa, mode; |
386 | 386 | ||
@@ -421,7 +421,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
421 | platform_device_register(&at91sam9263_nand_device); | 421 | platform_device_register(&at91sam9263_nand_device); |
422 | } | 422 | } |
423 | #else | 423 | #else |
424 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 424 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
425 | #endif | 425 | #endif |
426 | 426 | ||
427 | 427 | ||
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index ae28101e7542..5f3094870cad 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -195,7 +195,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
195 | * -------------------------------------------------------------------- */ | 195 | * -------------------------------------------------------------------- */ |
196 | 196 | ||
197 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 197 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
198 | static struct at91_nand_data nand_data; | 198 | static struct atmel_nand_data nand_data; |
199 | 199 | ||
200 | #define NAND_BASE AT91_CHIPSELECT_3 | 200 | #define NAND_BASE AT91_CHIPSELECT_3 |
201 | 201 | ||
@@ -212,8 +212,8 @@ static struct resource nand_resources[] = { | |||
212 | } | 212 | } |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static struct platform_device at91_nand_device = { | 215 | static struct platform_device atmel_nand_device = { |
216 | .name = "at91_nand", | 216 | .name = "atmel_nand", |
217 | .id = -1, | 217 | .id = -1, |
218 | .dev = { | 218 | .dev = { |
219 | .platform_data = &nand_data, | 219 | .platform_data = &nand_data, |
@@ -222,7 +222,7 @@ static struct platform_device at91_nand_device = { | |||
222 | .num_resources = ARRAY_SIZE(nand_resources), | 222 | .num_resources = ARRAY_SIZE(nand_resources), |
223 | }; | 223 | }; |
224 | 224 | ||
225 | void __init at91_add_device_nand(struct at91_nand_data *data) | 225 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
226 | { | 226 | { |
227 | unsigned long csa; | 227 | unsigned long csa; |
228 | 228 | ||
@@ -259,11 +259,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
259 | at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */ | 259 | at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */ |
260 | 260 | ||
261 | nand_data = *data; | 261 | nand_data = *data; |
262 | platform_device_register(&at91_nand_device); | 262 | platform_device_register(&atmel_nand_device); |
263 | } | 263 | } |
264 | 264 | ||
265 | #else | 265 | #else |
266 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 266 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
267 | #endif | 267 | #endif |
268 | 268 | ||
269 | 269 | ||
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index b22a1a004055..af2c33aff1a8 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -142,7 +142,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
142 | return cam60_nand_partition; | 142 | return cam60_nand_partition; |
143 | } | 143 | } |
144 | 144 | ||
145 | static struct at91_nand_data __initdata cam60_nand_data = { | 145 | static struct atmel_nand_data __initdata cam60_nand_data = { |
146 | .ale = 21, | 146 | .ale = 21, |
147 | .cle = 22, | 147 | .cle = 22, |
148 | // .det_pin = ... not there | 148 | // .det_pin = ... not there |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index 8a2a958639db..a1c41d7c0be9 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
@@ -181,7 +181,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
181 | return cap9adk_nand_partitions; | 181 | return cap9adk_nand_partitions; |
182 | } | 182 | } |
183 | 183 | ||
184 | static struct at91_nand_data __initdata cap9adk_nand_data = { | 184 | static struct atmel_nand_data __initdata cap9adk_nand_data = { |
185 | .ale = 21, | 185 | .ale = 21, |
186 | .cle = 22, | 186 | .cle = 22, |
187 | // .det_pin = ... not connected | 187 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c index dab958d25926..02a70b2f355b 100644 --- a/arch/arm/mach-at91/board-dk.c +++ b/arch/arm/mach-at91/board-dk.c | |||
@@ -147,7 +147,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
147 | return dk_nand_partition; | 147 | return dk_nand_partition; |
148 | } | 148 | } |
149 | 149 | ||
150 | static struct at91_nand_data __initdata dk_nand_data = { | 150 | static struct atmel_nand_data __initdata dk_nand_data = { |
151 | .ale = 22, | 151 | .ale = 22, |
152 | .cle = 21, | 152 | .cle = 21, |
153 | .det_pin = AT91_PIN_PB1, | 153 | .det_pin = AT91_PIN_PB1, |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index cb065febd95e..082ed59365a4 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -105,7 +105,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
105 | return kb9202_nand_partition; | 105 | return kb9202_nand_partition; |
106 | } | 106 | } |
107 | 107 | ||
108 | static struct at91_nand_data __initdata kb9202_nand_data = { | 108 | static struct atmel_nand_data __initdata kb9202_nand_data = { |
109 | .ale = 22, | 109 | .ale = 22, |
110 | .cle = 21, | 110 | .cle = 21, |
111 | // .det_pin = ... not there | 111 | // .det_pin = ... not there |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 8f76af5e219a..57a6221943ed 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -141,7 +141,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
141 | return ek_nand_partition; | 141 | return ek_nand_partition; |
142 | } | 142 | } |
143 | 143 | ||
144 | static struct at91_nand_data __initdata ek_nand_data = { | 144 | static struct atmel_nand_data __initdata ek_nand_data = { |
145 | .ale = 21, | 145 | .ale = 21, |
146 | .cle = 22, | 146 | .cle = 22, |
147 | // .det_pin = ... not connected | 147 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 4d1d9c777084..6a680795c3c8 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -178,7 +178,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
178 | return ek_nand_partition; | 178 | return ek_nand_partition; |
179 | } | 179 | } |
180 | 180 | ||
181 | static struct at91_nand_data __initdata ek_nand_data = { | 181 | static struct atmel_nand_data __initdata ek_nand_data = { |
182 | .ale = 21, | 182 | .ale = 21, |
183 | .cle = 22, | 183 | .cle = 22, |
184 | // .det_pin = ... not connected | 184 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 08382c0df221..43dfbd0d543a 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -183,7 +183,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
183 | return ek_nand_partition; | 183 | return ek_nand_partition; |
184 | } | 184 | } |
185 | 185 | ||
186 | static struct at91_nand_data __initdata ek_nand_data = { | 186 | static struct atmel_nand_data __initdata ek_nand_data = { |
187 | .ale = 22, | 187 | .ale = 22, |
188 | .cle = 21, | 188 | .cle = 21, |
189 | // .det_pin = ... not connected | 189 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index b4cd5d0ed597..6605a0980117 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -187,7 +187,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
187 | return ek_nand_partition; | 187 | return ek_nand_partition; |
188 | } | 188 | } |
189 | 189 | ||
190 | static struct at91_nand_data __initdata ek_nand_data = { | 190 | static struct atmel_nand_data __initdata ek_nand_data = { |
191 | .ale = 21, | 191 | .ale = 21, |
192 | .cle = 22, | 192 | .cle = 22, |
193 | // .det_pin = ... not connected | 193 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index b6a70fc735c3..66e77bb2e079 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -96,7 +96,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
96 | return ek_nand_partition; | 96 | return ek_nand_partition; |
97 | } | 97 | } |
98 | 98 | ||
99 | static struct at91_nand_data __initdata ek_nand_data = { | 99 | static struct atmel_nand_data __initdata ek_nand_data = { |
100 | .ale = 21, | 100 | .ale = 21, |
101 | .cle = 22, | 101 | .cle = 22, |
102 | // .det_pin = ... not connected | 102 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 7079050ab88d..bbbfd06f5e0c 100755 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -180,7 +180,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
180 | return yl9200_nand_partition; | 180 | return yl9200_nand_partition; |
181 | } | 181 | } |
182 | 182 | ||
183 | static struct at91_nand_data __initdata yl9200_nand_data = { | 183 | static struct atmel_nand_data __initdata yl9200_nand_data = { |
184 | .ale = 6, | 184 | .ale = 6, |
185 | .cle = 7, | 185 | .cle = 7, |
186 | // .det_pin = ... not connected | 186 | // .det_pin = ... not connected |
diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig index af90b00100fd..8dc48214f0b7 100644 --- a/arch/avr32/boards/atstk1000/Kconfig +++ b/arch/avr32/boards/atstk1000/Kconfig | |||
@@ -18,6 +18,10 @@ config BOARD_ATSTK1004 | |||
18 | bool "ATSTK1004" | 18 | bool "ATSTK1004" |
19 | select CPU_AT32AP7002 | 19 | select CPU_AT32AP7002 |
20 | 20 | ||
21 | config BOARD_ATSTK1006 | ||
22 | bool "ATSTK1006" | ||
23 | select CPU_AT32AP7000 | ||
24 | |||
21 | endchoice | 25 | endchoice |
22 | 26 | ||
23 | 27 | ||
diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile index beead86462e8..edecee03742d 100644 --- a/arch/avr32/boards/atstk1000/Makefile +++ b/arch/avr32/boards/atstk1000/Makefile | |||
@@ -2,3 +2,4 @@ obj-y += setup.o flash.o | |||
2 | obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o | 2 | obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o |
3 | obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o | 3 | obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o |
4 | obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o | 4 | obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o |
5 | obj-$(CONFIG_BOARD_ATSTK1006) += atstk1002.o | ||
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index e11659b732fa..14dc5a143695 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ATSTK1002 daughterboard-specific init code | 2 | * ATSTK1002/ATSTK1006 daughterboard-specific init code |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2006 Atmel Corporation | 4 | * Copyright (C) 2005-2007 Atmel Corporation |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 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 | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -35,6 +35,74 @@ unsigned long at32_board_osc_rates[3] = { | |||
35 | [2] = 12000000, /* 12 MHz on osc1 */ | 35 | [2] = 12000000, /* 12 MHz on osc1 */ |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* | ||
39 | * The ATSTK1006 daughterboard is very similar to the ATSTK1002. Both | ||
40 | * have the AT32AP7000 chip on board; the difference is that the | ||
41 | * STK1006 has 128 MB SDRAM (the STK1002 uses the 8 MB SDRAM chip on | ||
42 | * the STK1000 motherboard) and 256 MB NAND flash (the STK1002 has | ||
43 | * none.) | ||
44 | * | ||
45 | * The RAM difference is handled by the boot loader, so the only | ||
46 | * difference we end up handling here is the NAND flash. | ||
47 | */ | ||
48 | #ifdef CONFIG_BOARD_ATSTK1006 | ||
49 | #include <linux/mtd/partitions.h> | ||
50 | #include <asm/arch/smc.h> | ||
51 | |||
52 | static struct smc_timing nand_timing __initdata = { | ||
53 | .ncs_read_setup = 0, | ||
54 | .nrd_setup = 10, | ||
55 | .ncs_write_setup = 0, | ||
56 | .nwe_setup = 10, | ||
57 | |||
58 | .ncs_read_pulse = 30, | ||
59 | .nrd_pulse = 15, | ||
60 | .ncs_write_pulse = 30, | ||
61 | .nwe_pulse = 15, | ||
62 | |||
63 | .read_cycle = 30, | ||
64 | .write_cycle = 30, | ||
65 | |||
66 | .ncs_read_recover = 0, | ||
67 | .nrd_recover = 15, | ||
68 | .ncs_write_recover = 0, | ||
69 | /* WE# high -> RE# low min 60 ns */ | ||
70 | .nwe_recover = 50, | ||
71 | }; | ||
72 | |||
73 | static struct smc_config nand_config __initdata = { | ||
74 | .bus_width = 1, | ||
75 | .nrd_controlled = 1, | ||
76 | .nwe_controlled = 1, | ||
77 | .nwait_mode = 0, | ||
78 | .byte_write = 0, | ||
79 | .tdf_cycles = 2, | ||
80 | .tdf_mode = 0, | ||
81 | }; | ||
82 | |||
83 | static struct mtd_partition nand_partitions[] = { | ||
84 | { | ||
85 | .name = "main", | ||
86 | .offset = 0x00000000, | ||
87 | .size = MTDPART_SIZ_FULL, | ||
88 | }, | ||
89 | }; | ||
90 | |||
91 | static struct mtd_partition *nand_part_info(int size, int *num_partitions) | ||
92 | { | ||
93 | *num_partitions = ARRAY_SIZE(nand_partitions); | ||
94 | return nand_partitions; | ||
95 | } | ||
96 | |||
97 | struct atmel_nand_data atstk1006_nand_data __initdata = { | ||
98 | .cle = 21, | ||
99 | .ale = 22, | ||
100 | .rdy_pin = GPIO_PIN_PB(30), | ||
101 | .enable_pin = GPIO_PIN_PB(29), | ||
102 | .partition_info = nand_part_info, | ||
103 | }; | ||
104 | #endif | ||
105 | |||
38 | struct eth_addr { | 106 | struct eth_addr { |
39 | u8 addr[6]; | 107 | u8 addr[6]; |
40 | }; | 108 | }; |
@@ -218,6 +286,12 @@ static int __init atstk1002_init(void) | |||
218 | 286 | ||
219 | at32_add_system_devices(); | 287 | at32_add_system_devices(); |
220 | 288 | ||
289 | #ifdef CONFIG_BOARD_ATSTK1006 | ||
290 | smc_set_timing(&nand_config, &nand_timing); | ||
291 | smc_set_configuration(3, &nand_config); | ||
292 | at32_add_device_nand(0, &atstk1006_nand_data); | ||
293 | #endif | ||
294 | |||
221 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | 295 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
222 | at32_add_device_usart(1); | 296 | at32_add_device_usart(1); |
223 | #else | 297 | #else |
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 604f44f5dd16..351e1b42f937 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -1871,6 +1871,58 @@ fail: | |||
1871 | #endif | 1871 | #endif |
1872 | 1872 | ||
1873 | /* -------------------------------------------------------------------- | 1873 | /* -------------------------------------------------------------------- |
1874 | * NAND Flash / SmartMedia | ||
1875 | * -------------------------------------------------------------------- */ | ||
1876 | static struct resource smc_cs3_resource[] __initdata = { | ||
1877 | { | ||
1878 | .start = 0x0c000000, | ||
1879 | .end = 0x0fffffff, | ||
1880 | .flags = IORESOURCE_MEM, | ||
1881 | }, { | ||
1882 | .start = 0xfff03c00, | ||
1883 | .end = 0xfff03fff, | ||
1884 | .flags = IORESOURCE_MEM, | ||
1885 | }, | ||
1886 | }; | ||
1887 | |||
1888 | struct platform_device *__init | ||
1889 | at32_add_device_nand(unsigned int id, struct atmel_nand_data *data) | ||
1890 | { | ||
1891 | struct platform_device *pdev; | ||
1892 | |||
1893 | if (id != 0 || !data) | ||
1894 | return NULL; | ||
1895 | |||
1896 | pdev = platform_device_alloc("atmel_nand", id); | ||
1897 | if (!pdev) | ||
1898 | goto fail; | ||
1899 | |||
1900 | if (platform_device_add_resources(pdev, smc_cs3_resource, | ||
1901 | ARRAY_SIZE(smc_cs3_resource))) | ||
1902 | goto fail; | ||
1903 | |||
1904 | if (platform_device_add_data(pdev, data, | ||
1905 | sizeof(struct atmel_nand_data))) | ||
1906 | goto fail; | ||
1907 | |||
1908 | set_ebi_sfr_bits(HMATRIX_BIT(CS3A)); | ||
1909 | if (data->enable_pin) | ||
1910 | at32_select_gpio(data->enable_pin, | ||
1911 | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); | ||
1912 | if (data->rdy_pin) | ||
1913 | at32_select_gpio(data->rdy_pin, 0); | ||
1914 | if (data->det_pin) | ||
1915 | at32_select_gpio(data->det_pin, 0); | ||
1916 | |||
1917 | platform_device_add(pdev); | ||
1918 | return pdev; | ||
1919 | |||
1920 | fail: | ||
1921 | platform_device_put(pdev); | ||
1922 | return NULL; | ||
1923 | } | ||
1924 | |||
1925 | /* -------------------------------------------------------------------- | ||
1874 | * AC97C | 1926 | * AC97C |
1875 | * -------------------------------------------------------------------- */ | 1927 | * -------------------------------------------------------------------- */ |
1876 | static struct resource atmel_ac97c0_resource[] __initdata = { | 1928 | static struct resource atmel_ac97c0_resource[] __initdata = { |
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c index fa427ed42787..b2d9bc61a35c 100644 --- a/arch/avr32/mach-at32ap/hsmc.c +++ b/arch/avr32/mach-at32ap/hsmc.c | |||
@@ -278,4 +278,4 @@ static int __init hsmc_init(void) | |||
278 | { | 278 | { |
279 | return platform_driver_register(&hsmc_driver); | 279 | return platform_driver_register(&hsmc_driver); |
280 | } | 280 | } |
281 | arch_initcall(hsmc_init); | 281 | core_initcall(hsmc_init); |