From patchwork Thu Dec 3 14:18:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vimal singh X-Patchwork-Id: 64557 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 nB3EIYS5005770 for ; Thu, 3 Dec 2009 14:18:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756195AbZLCOST (ORCPT ); Thu, 3 Dec 2009 09:18:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756101AbZLCOST (ORCPT ); Thu, 3 Dec 2009 09:18:19 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:61788 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756094AbZLCOSR (ORCPT ); Thu, 3 Dec 2009 09:18:17 -0500 Received: by bwz27 with SMTP id 27so1114166bwz.21 for ; Thu, 03 Dec 2009 06:18:23 -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=LvotevZLtFfvxOJCXYYSjT5pznMkzX4h/SmqmUA7//4=; b=b+mT0/yUyTSkNW2FdmMDNd0T5q1/9o4GY+/TbMiaBHip4hTrK+RwWGcuH8Suj1Ay8u eKHAV5X9raM+t9L/kQ/BilODJlrAsJUvhLXv8j5JXcl/ejC6m50fCqWjf+eQhhrWuLYy b7pztr/FV5sXLqHZfR6/2kM8EAjZirEzafcAM= 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=x3ZfznZX8nC9tFjngHtF3YHmY/cnWLR+CJZpzB1/Qb7srkI1WcEhb2uTeQOZIC93Cz GDa/VWwczm2lq0/4FzCLqvW56iK6cuigJChGSUMgWNIDola/vDiPES0kkRm1OUXKj5my taYUw/DvhiSWTUgv9wWC/so7FU3uOurPa3V18= MIME-Version: 1.0 Received: by 10.204.32.16 with SMTP id a16mr1675856bkd.190.1259849903246; Thu, 03 Dec 2009 06:18:23 -0800 (PST) From: Vimal Singh Date: Thu, 3 Dec 2009 19:48:03 +0530 Message-ID: Subject: [PATCH 3/4]: OMAP3: Add support for NAND on ZOOM3 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 a277d38..4848ab0 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -82,6 +82,7 @@ obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ mmc-twl4030.o \ board-zoom-debugboard.o obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \ + board-zoom-flash.o \ board-zoom-peripherals.o \ mmc-twl4030.o \ board-zoom-debugboard.o diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c index 8d965a6..49090da 100644 --- a/arch/arm/mach-omap2/board-zoom3.c +++ b/arch/arm/mach-omap2/board-zoom3.c @@ -42,9 +42,58 @@ static void __init omap_zoom_init_irq(void) omap_gpio_init(); } +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 = 1280 * (64 * 2048), /* 160M, 0xA000000 */ + }, + { + .name = "userdata", + .offset = MTDPART_OFS_APPEND, /* Offset = 0xC000000 */ + .size = 256 * (64 * 2048), /* 32M, 0x2000000 */ + }, + { + .name = "cache", + .offset = MTDPART_OFS_APPEND, /* Offset = 0xE000000 */ + .size = 256 * (64 * 2048), /* 32M, 0x2000000 */ + }, +}; + +static struct flash_partitions zoom_flash_partitions[] = { + { + .parts = zoom_nand_partitions, + .nr_parts = ARRAY_SIZE(zoom_nand_partitions), + }, +}; + static void __init omap_zoom_init(void) { zoom_peripherals_init(); + zoom_flash_init(zoom_flash_partitions, ZOOM_NAND_CS); zoom_debugboard_init(); }