[PATCH 1/2] OMAP3630SDP: Add support for Flash

2010-04-06 Thread Sukumar Ghorai
Add support for NAND, OneNAND, NOR on OMAP 3630-sdp board.

Signed-off-by: Sukumar Ghorai s-gho...@ti.com
---
---
 arch/arm/mach-omap2/Makefile  |1 +
 arch/arm/mach-omap2/board-3630sdp.c   |  111 +
 arch/arm/mach-omap2/board-sdp-flash.c |2 +
 3 files changed, 114 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4b9fc57..0cf463c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -133,6 +133,7 @@ obj-$(CONFIG_MACH_OMAP_ZOOM3)   += 
board-zoom3.o \
   board-zoom-debugboard.o
 obj-$(CONFIG_MACH_OMAP_3630SDP)+= board-3630sdp.o \
   board-zoom-peripherals.o \
+  board-sdp-flash.o \
   hsmmc.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   hsmmc.o
diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
index 504d2bd..a2ce116 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -22,9 +22,11 @@
 #include plat/usb.h
 
 #include mach/board-zoom.h
+#include mach/board-sdp.h
 
 #include mux.h
 #include sdram-hynix-h8mbx00u0mer-0em.h
+extern void sdp_flash_init(struct flash_partitions[]);
 
 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
 
@@ -93,12 +95,121 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+static struct mtd_partition sdp_nor_partitions[] = {
+   /* bootloader (U-Boot, etc) in first sector */
+   {
+   .name   = Bootloader-NOR,
+   .offset = 0,
+   .size   = SZ_256K,
+   .mask_flags = MTD_WRITEABLE, /* force read-only */
+   },
+   /* bootloader params in the next sector */
+   {
+   .name   = Params-NOR,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = SZ_256K,
+   .mask_flags = 0,
+   },
+   /* kernel */
+   {
+   .name   = Kernel-NOR,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = SZ_2M,
+   .mask_flags = 0
+   },
+   /* file system */
+   {
+   .name   = Filesystem-NOR,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = MTDPART_SIZ_FULL,
+   .mask_flags = 0
+   }
+};
+
+static struct mtd_partition sdp_onenand_partitions[] = {
+   {
+   .name   = X-Loader-OneNAND,
+   .offset = 0,
+   .size   = 4 * (64 * 2048),
+   .mask_flags = MTD_WRITEABLE  /* force read-only */
+   },
+   {
+   .name   = U-Boot-OneNAND,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 2 * (64 * 2048),
+   .mask_flags = MTD_WRITEABLE  /* force read-only */
+   },
+   {
+   .name   = U-Boot Environment-OneNAND,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 1 * (64 * 2048),
+   },
+   {
+   .name   = Kernel-OneNAND,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 16 * (64 * 2048),
+   },
+   {
+   .name   = File System-OneNAND,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = MTDPART_SIZ_FULL,
+   },
+};
+
+static struct mtd_partition sdp_nand_partitions[] = {
+   /* All the partition sizes are listed in terms of NAND block size */
+   {
+   .name   = X-Loader-NAND,
+   .offset = 0,
+   .size   = 4 * (64 * 2048),
+   .mask_flags = MTD_WRITEABLE,/* force read-only */
+   },
+   {
+   .name   = U-Boot-NAND,
+   .offset = MTDPART_OFS_APPEND,   /* Offset = 0x8 */
+   .size   = 10 * (64 * 2048),
+   .mask_flags = MTD_WRITEABLE,/* force read-only */
+   },
+   {
+   .name   = Boot Env-NAND,
+
+   .offset = MTDPART_OFS_APPEND,   /* Offset = 0x1c */
+   .size   = 6 * (64 * 2048),
+   },
+   {
+   .name   = Kernel-NAND,
+   .offset = MTDPART_OFS_APPEND,   /* Offset = 0x28 */
+   .size   = 40 * (64 * 2048),
+   },
+   {
+   .name   = File System - NAND,
+   .size   = MTDPART_SIZ_FULL,
+   .offset = MTDPART_OFS_APPEND,   /* Offset = 

Re: [PATCH 1/2] OMAP3630SDP: Add support for Flash

2010-04-06 Thread Vimal Singh
On Tue, Apr 6, 2010 at 5:59 PM, Sukumar Ghorai s-gho...@ti.com wrote:
 Add support for NAND, OneNAND, NOR on OMAP 3630-sdp board.

 Signed-off-by: Sukumar Ghorai s-gho...@ti.com
 ---

Feel free to add my acked-by:
Acked-by: Vimal Singh vimal.neww...@gmail.com

Regards,
Vimal
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html