From patchwork Thu Dec 3 14:18:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vimal singh X-Patchwork-Id: 64558 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB3EJCcM006036 for ; Thu, 3 Dec 2009 14:19:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756035AbZLCOTE (ORCPT ); Thu, 3 Dec 2009 09:19:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752997AbZLCOTE (ORCPT ); Thu, 3 Dec 2009 09:19:04 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:45893 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbZLCOTD (ORCPT ); Thu, 3 Dec 2009 09:19:03 -0500 Received: by bwz27 with SMTP id 27so1115018bwz.21 for ; Thu, 03 Dec 2009 06:19:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:cc:content-type; bh=bLPINUxelzpcg+9dCZMo4WiXc2ZljWRsiJyEsBpCJkQ=; b=NrQM5v/M3m5m7OmdsYJbPrg9iD0izIGyndbKmK7ZniSNLr2+FYMFOMUQlNSE3MD+s+ WbjYdX6lvMK1+jH8igTbfZr2yCN0ldoLVIg0q7zIq7pqL5PAozWfXGjp7sZBMzXFGr9A ecfOWA37NgwUcTBFwe2Z54fbsGCnoLNoaaXp8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; b=hgwhY7f4hHttwGF/VSZ++67OvRaYYGcG0jedXPW9QPUerCQvSNnUWmF+mTB2by6BUp +LZYSg74DDbyzYmD9+p4W5tZlq6tPAn+n1oyaMWeOlr7uK6Dq+dLuQRJN+Ecz3bXydc8 dIy1W4Vp5KfRiZaf3PpL4l2hch3EIhNmqA1hk= MIME-Version: 1.0 Received: by 10.204.6.65 with SMTP id 1mr1676549bky.186.1259849944548; Thu, 03 Dec 2009 06:19:04 -0800 (PST) From: Vimal Singh Date: Thu, 3 Dec 2009 19:48:44 +0530 Message-ID: Subject: [PATCH 4/4]: OMAP3: Add support for NAND on LDP board To: linux-omap@vger.kernel.org Cc: Tony Lindgren Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 4848ab0..f730ddc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -61,6 +61,7 @@ obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \ mmc-twl4030.o obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ + board-zoom-flash.o \ mmc-twl4030.o obj-$(CONFIG_MACH_OVERO) += board-overo.o \ mmc-twl4030.o diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index c062238..25bbb4f 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 @@ -374,6 +375,45 @@ static struct platform_device *ldp_devices[] __initdata = { &ldp_gpio_keys_device, }; +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) { omap_i2c_init(); @@ -385,6 +425,7 @@ static void __init omap_ldp_init(void) ads7846_dev_init(); omap_serial_init(); usb_musb_init(); + zoom_flash_init(zoom_flash_partitions, ZOOM_NAND_CS); twl4030_mmc_init(mmc); /* link regulators to MMC adapters */