]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
omap3: add support for NAND on zoom2 board
authorSukumar Ghorai <s-ghorai@ti.com>
Fri, 9 Jul 2010 14:27:48 +0000 (14:27 +0000)
committerTony Lindgren <tony@atomide.com>
Mon, 2 Aug 2010 12:46:29 +0000 (15:46 +0300)
This patch adds NAND support to ZOOM2 board.

Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com>
Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-zoom2.c
arch/arm/mach-omap2/include/mach/board-zoom.h

index 9abefccbce8d5336fb4ea391b8456b52522fd12d..3e6b4d9954b6900ae1ddccbf7e059967b5761d04 100644 (file)
@@ -130,6 +130,7 @@ obj-$(CONFIG_MACH_NOKIA_RX51)               += board-rx51.o \
                                           hsmmc.o
 obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom2.o \
                                           board-zoom-peripherals.o \
+                                          board-flash.o \
                                           hsmmc.o \
                                           board-zoom-debugboard.o
 obj-$(CONFIG_MACH_OMAP_ZOOM3)          += board-zoom3.o \
index 1520a2c141490bd48ea57f8463a9312a12fbac4f..0eafae2f91813572997b85b63b840c47501adfcc 100644 (file)
@@ -90,10 +90,53 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux      NULL
 #endif
 
+static struct mtd_partition zoom_nand_partitions[] = {
+       /* All the partition sizes are listed in terms of NAND block size */
+       {
+               .name           = "X-Loader-NAND",
+               .offset         = 0,
+               .size           = 4 * (64 * 2048),      /* 512KB, 0x80000 */
+               .mask_flags     = MTD_WRITEABLE,        /* force read-only */
+       },
+       {
+               .name           = "U-Boot-NAND",
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x80000 */
+               .size           = 10 * (64 * 2048),     /* 1.25MB, 0x140000 */
+               .mask_flags     = MTD_WRITEABLE,        /* force read-only */
+       },
+       {
+               .name           = "Boot Env-NAND",
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1c0000 */
+               .size           = 2 * (64 * 2048),      /* 256KB, 0x40000 */
+       },
+       {
+               .name           = "Kernel-NAND",
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x0200000*/
+               .size           = 240 * (64 * 2048),    /* 30M, 0x1E00000 */
+       },
+       {
+               .name           = "system",
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x2000000 */
+               .size           = 3328 * (64 * 2048),   /* 416M, 0x1A000000 */
+       },
+       {
+               .name           = "userdata",
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1C000000*/
+               .size           = 256 * (64 * 2048),    /* 32M, 0x2000000 */
+       },
+       {
+               .name           = "cache",
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1E000000*/
+               .size           = 256 * (64 * 2048),    /* 32M, 0x2000000 */
+       },
+};
+
 static void __init omap_zoom2_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        zoom_peripherals_init();
+       board_nand_init(zoom_nand_partitions,
+                       ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
        zoom_debugboard_init();
 }
 
index c93b29e21b78afd28258bf6dc8fde504811d3fee..3af69d2c3dcde626a6f74cdff393cc3be7926201 100644 (file)
@@ -1,5 +1,11 @@
 /*
  * Defines for zoom boards
  */
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+
+#define ZOOM_NAND_CS    0
+
+extern void __init board_nand_init(struct mtd_partition *, u8 nr_parts, u8 cs);
 extern int __init zoom_debugboard_init(void);
 extern void __init zoom_peripherals_init(void);