From patchwork Tue Apr 13 17:37:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sukumar Ghorai X-Patchwork-Id: 92222 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3DHbZW7005030 for ; Tue, 13 Apr 2010 17:37:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752179Ab0DMRhe (ORCPT ); Tue, 13 Apr 2010 13:37:34 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:46820 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996Ab0DMRhd (ORCPT ); Tue, 13 Apr 2010 13:37:33 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o3DHbUrR030508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 13 Apr 2010 12:37:32 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o3DHbQWY021548; Tue, 13 Apr 2010 23:07:29 +0530 (IST) From: Sukumar Ghorai To: linux-omap@vger.kernel.org Cc: Sukumar Ghorai , Vimal Singh Subject: [PATCH v2 6/8] omap3: add support for NAND on LDP board Date: Tue, 13 Apr 2010 23:07:18 +0530 Message-Id: <1271180246-31779-7-git-send-email-s-ghorai@ti.com> X-Mailer: git-send-email 1.5.4.7 In-Reply-To: <1271180246-31779-6-git-send-email-s-ghorai@ti.com> References: <1271180246-31779-1-git-send-email-s-ghorai@ti.com> <1271180246-31779-2-git-send-email-s-ghorai@ti.com> <1271180246-31779-3-git-send-email-s-ghorai@ti.com> <1271180246-31779-4-git-send-email-s-ghorai@ti.com> <1271180246-31779-5-git-send-email-s-ghorai@ti.com> <1271180246-31779-6-git-send-email-s-ghorai@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 13 Apr 2010 17:37:36 +0000 (UTC) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 0cf463c..7556e72 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -108,6 +108,7 @@ obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \ obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o \ hsmmc.o obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ + board-zoom-flash.o \ hsmmc.o obj-$(CONFIG_MACH_OVERO) += board-overo.o \ hsmmc.o diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 5fcb52e..0976bd9 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -389,6 +390,45 @@ static struct omap_musb_board_data musb_board_data = { .power = 100, }; +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 = "File System - NAND", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x2000000 */ + .size = MTDPART_SIZ_FULL, /* 96MB, 0x6000000 */ + }, + +}; + +static struct flash_partitions zoom_flash_partitions[] = { + { + .parts = zoom_nand_partitions, + .nr_parts = ARRAY_SIZE(zoom_nand_partitions), + }, +}; + static void __init omap_ldp_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); @@ -401,6 +441,7 @@ static void __init omap_ldp_init(void) ads7846_dev_init(); omap_serial_init(); usb_musb_init(&musb_board_data); + zoom_flash_init(zoom_flash_partitions, ZOOM_NAND_CS); omap2_hsmmc_init(mmc); /* link regulators to MMC adapters */