aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51-peripherals.c
diff options
context:
space:
mode:
authorJuha Yrjola <juha.yrjola@solidboot.com>2009-05-28 16:23:52 -0400
committerTony Lindgren <tony@atomide.com>2009-05-28 16:23:52 -0400
commitaa62e90fe0700c037675926fff9f75b0b1c00d78 (patch)
treef1ae6548e63aaf797aca9efbe55f7e75584d6eec /arch/arm/mach-omap2/board-rx51-peripherals.c
parent279b918d726a66c61c9dc7aec8b1fb035d40fdfc (diff)
ARM: OMAP2/3: Add generic onenand support when connected to GPMC
Add generic onenand support when connected to GPMC and make the boards to use it. The patch has been modified to make it more generic to support all the boards with GPMC. The patch also remove unused prototype for omap2_onenand_rephase(void). Note that board-apollon.c is currently using the MTD_ONENAND_GENERIC and setting the GPMC timings in the bootloader. Setting the GPMC timings in the bootloader will not allow supporting frequency scaling for the onenand source clock. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index a7381729645c..ca18ae94185a 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -27,6 +27,7 @@
27#include <mach/dma.h> 27#include <mach/dma.h>
28#include <mach/gpmc.h> 28#include <mach/gpmc.h>
29#include <mach/keypad.h> 29#include <mach/keypad.h>
30#include <mach/onenand.h>
30 31
31#include "mmc-twl4030.h" 32#include "mmc-twl4030.h"
32 33
@@ -408,6 +409,62 @@ static int __init rx51_i2c_init(void)
408 return 0; 409 return 0;
409} 410}
410 411
412#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
413 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
414
415static struct mtd_partition onenand_partitions[] = {
416 {
417 .name = "bootloader",
418 .offset = 0,
419 .size = 0x20000,
420 .mask_flags = MTD_WRITEABLE, /* Force read-only */
421 },
422 {
423 .name = "config",
424 .offset = MTDPART_OFS_APPEND,
425 .size = 0x60000,
426 },
427 {
428 .name = "log",
429 .offset = MTDPART_OFS_APPEND,
430 .size = 0x40000,
431 },
432 {
433 .name = "kernel",
434 .offset = MTDPART_OFS_APPEND,
435 .size = 0x200000,
436 },
437 {
438 .name = "initfs",
439 .offset = MTDPART_OFS_APPEND,
440 .size = 0x200000,
441 },
442 {
443 .name = "rootfs",
444 .offset = MTDPART_OFS_APPEND,
445 .size = MTDPART_SIZ_FULL,
446 },
447};
448
449static struct omap_onenand_platform_data board_onenand_data = {
450 .cs = 0,
451 .gpio_irq = 65,
452 .parts = onenand_partitions,
453 .nr_parts = ARRAY_SIZE(onenand_partitions),
454};
455
456static void __init board_onenand_init(void)
457{
458 gpmc_onenand_init(&board_onenand_data);
459}
460
461#else
462
463static inline void board_onenand_init(void)
464{
465}
466
467#endif
411 468
412void __init rx51_peripherals_init(void) 469void __init rx51_peripherals_init(void)
413{ 470{
@@ -415,5 +472,6 @@ void __init rx51_peripherals_init(void)
415 ARRAY_SIZE(rx51_peripherals_devices)); 472 ARRAY_SIZE(rx51_peripherals_devices));
416 rx51_i2c_init(); 473 rx51_i2c_init();
417 rx51_init_smc91x(); 474 rx51_init_smc91x();
475 board_onenand_init();
418} 476}
419 477