diff options
Diffstat (limited to 'arch/arm/mach-davinci/board-da830-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-da830-evm.c | 82 |
1 files changed, 49 insertions, 33 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index dc169ec80a9f..b433b22e1777 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -320,6 +320,20 @@ static inline void da830_evm_init_mmc(void) | |||
320 | } | 320 | } |
321 | } | 321 | } |
322 | 322 | ||
323 | /* | ||
324 | * UI board NAND/NOR flashes only use 8-bit data bus. | ||
325 | */ | ||
326 | static const short da830_evm_emif25_pins[] = { | ||
327 | DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3, | ||
328 | DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7, | ||
329 | DA830_EMA_A_0, DA830_EMA_A_1, DA830_EMA_A_2, DA830_EMA_A_3, | ||
330 | DA830_EMA_A_4, DA830_EMA_A_5, DA830_EMA_A_6, DA830_EMA_A_7, | ||
331 | DA830_EMA_A_8, DA830_EMA_A_9, DA830_EMA_A_10, DA830_EMA_A_11, | ||
332 | DA830_EMA_A_12, DA830_EMA_BA_0, DA830_EMA_BA_1, DA830_NEMA_WE, | ||
333 | DA830_NEMA_CS_2, DA830_NEMA_CS_3, DA830_NEMA_OE, DA830_EMA_WAIT_0, | ||
334 | -1 | ||
335 | }; | ||
336 | |||
323 | #ifdef CONFIG_DA830_UI_NAND | 337 | #ifdef CONFIG_DA830_UI_NAND |
324 | static struct mtd_partition da830_evm_nand_partitions[] = { | 338 | static struct mtd_partition da830_evm_nand_partitions[] = { |
325 | /* bootloader (U-Boot, etc) in first sector */ | 339 | /* bootloader (U-Boot, etc) in first sector */ |
@@ -410,21 +424,41 @@ static struct platform_device da830_evm_nand_device = { | |||
410 | .num_resources = ARRAY_SIZE(da830_evm_nand_resources), | 424 | .num_resources = ARRAY_SIZE(da830_evm_nand_resources), |
411 | .resource = da830_evm_nand_resources, | 425 | .resource = da830_evm_nand_resources, |
412 | }; | 426 | }; |
427 | |||
428 | static inline void da830_evm_init_nand(void) | ||
429 | { | ||
430 | int ret; | ||
431 | |||
432 | ret = da8xx_pinmux_setup(da830_evm_emif25_pins); | ||
433 | if (ret) | ||
434 | pr_warning("da830_evm_init: emif25 mux setup failed: %d\n", | ||
435 | ret); | ||
436 | |||
437 | ret = platform_device_register(&da830_evm_nand_device); | ||
438 | if (ret) | ||
439 | pr_warning("da830_evm_init: NAND device not registered.\n"); | ||
440 | } | ||
441 | #else | ||
442 | static inline void da830_evm_init_nand(void) { } | ||
413 | #endif | 443 | #endif |
414 | 444 | ||
415 | /* | 445 | #ifdef CONFIG_DA830_UI_LCD |
416 | * UI board NAND/NOR flashes only use 8-bit data bus. | 446 | static inline void da830_evm_init_lcdc(void) |
417 | */ | 447 | { |
418 | static const short da830_evm_emif25_pins[] = { | 448 | int ret; |
419 | DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3, | 449 | |
420 | DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7, | 450 | ret = da8xx_pinmux_setup(da830_lcdcntl_pins); |
421 | DA830_EMA_A_0, DA830_EMA_A_1, DA830_EMA_A_2, DA830_EMA_A_3, | 451 | if (ret) |
422 | DA830_EMA_A_4, DA830_EMA_A_5, DA830_EMA_A_6, DA830_EMA_A_7, | 452 | pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n", |
423 | DA830_EMA_A_8, DA830_EMA_A_9, DA830_EMA_A_10, DA830_EMA_A_11, | 453 | ret); |
424 | DA830_EMA_A_12, DA830_EMA_BA_0, DA830_EMA_BA_1, DA830_NEMA_WE, | 454 | |
425 | DA830_NEMA_CS_2, DA830_NEMA_CS_3, DA830_NEMA_OE, DA830_EMA_WAIT_0, | 455 | ret = da8xx_register_lcdc(&sharp_lcd035q3dg01_pdata); |
426 | -1 | 456 | if (ret) |
427 | }; | 457 | pr_warning("da830_evm_init: lcd setup failed: %d\n", ret); |
458 | } | ||
459 | #else | ||
460 | static inline void da830_evm_init_lcdc(void) { } | ||
461 | #endif | ||
428 | 462 | ||
429 | static __init void da830_evm_init(void) | 463 | static __init void da830_evm_init(void) |
430 | { | 464 | { |
@@ -480,27 +514,9 @@ static __init void da830_evm_init(void) | |||
480 | 514 | ||
481 | da830_evm_init_mmc(); | 515 | da830_evm_init_mmc(); |
482 | 516 | ||
483 | #ifdef CONFIG_DA830_UI | 517 | da830_evm_init_lcdc(); |
484 | #ifdef CONFIG_DA830_UI_LCD | ||
485 | ret = da8xx_pinmux_setup(da830_lcdcntl_pins); | ||
486 | if (ret) | ||
487 | pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n", | ||
488 | ret); | ||
489 | |||
490 | ret = da8xx_register_lcdc(&sharp_lcd035q3dg01_pdata); | ||
491 | if (ret) | ||
492 | pr_warning("da830_evm_init: lcd setup failed: %d\n", ret); | ||
493 | #else /* Must be NAND or NOR */ | ||
494 | ret = da8xx_pinmux_setup(da830_evm_emif25_pins); | ||
495 | if (ret) | ||
496 | pr_warning("da830_evm_init: emif25 mux setup failed: %d\n", | ||
497 | ret); | ||
498 | 518 | ||
499 | ret = platform_device_register(&da830_evm_nand_device); | 519 | da830_evm_init_nand(); |
500 | if (ret) | ||
501 | pr_warning("da830_evm_init: NAND device not registered.\n"); | ||
502 | #endif | ||
503 | #endif | ||
504 | 520 | ||
505 | ret = da8xx_register_rtc(); | 521 | ret = da8xx_register_rtc(); |
506 | if (ret) | 522 | if (ret) |