From patchwork Thu Feb 11 05:21:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vimal singh X-Patchwork-Id: 78639 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 o1B5LpKI031376 for ; Thu, 11 Feb 2010 05:21:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751077Ab0BKFVu (ORCPT ); Thu, 11 Feb 2010 00:21:50 -0500 Received: from mail-bw0-f219.google.com ([209.85.218.219]:50887 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880Ab0BKFVu (ORCPT ); Thu, 11 Feb 2010 00:21:50 -0500 Received: by bwz19 with SMTP id 19so21930bwz.28 for ; Wed, 10 Feb 2010 21:21:48 -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=QoTOc0BqIEg31bZhUYZXux/p/XHLGPxGyU2Doa1dJdU=; b=kx67g4PNcwBdIItjNMldWU7NYmsdQegWUXz3yq0CTxOfxGu1qSeX7AASHisoTliAE8 4DI9e/bYPTNpR9TIyW3Ap0AZGon7hARUNlEPXmLpC/LouZGJJb/mDswE73QPKnsGY2je NqFbhjac4tIE8PIZcK2olvuMkjMIrr9tBU4Jo= 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=Lne6SuVP/pZN3ikvQ90PGzT+F7d14HKNKIGS6Rtm9v/DeakAYQOkPZ2UTQmLOpw5II KUoLetDROLH57+jqVFMShizgvHwx7xGC1P/dQHrV488AhwHStxvNJ5Q+mCrsZw2dm2fP 9LQeJ4FoOz0GQEizj0I0q1VmhlUBVVR7TAzxg= MIME-Version: 1.0 Received: by 10.204.133.21 with SMTP id d21mr848107bkt.108.1265865708458; Wed, 10 Feb 2010 21:21:48 -0800 (PST) From: Vimal Singh Date: Thu, 11 Feb 2010 10:51:28 +0530 Message-ID: Subject: [PATCH v2 3/3] 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 11 Feb 2010 05:21:51 +0000 (UTC) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index bd37d6e..556e62f 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -115,6 +115,7 @@ obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ hsmmc.o \ board-zoom-debugboard.o obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \ + board-zoom-flash.o \ board-zoom-peripherals.o \ hsmmc.o \ board-zoom-debugboard.o diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c index d3e3cd5..fcd0c0d 100644 --- a/arch/arm/mach-omap2/board-zoom3.c +++ b/arch/arm/mach-omap2/board-zoom3.c @@ -34,6 +34,54 @@ static void __init omap_zoom_map_io(void) static struct omap_board_config_kernel zoom_config[] __initdata = { }; +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_irq(void) { omap_board_config = zoom_config; @@ -66,6 +114,7 @@ static void __init omap_zoom_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); zoom_peripherals_init(); + zoom_flash_init(zoom_flash_partitions, ZOOM_NAND_CS); zoom_debugboard_init(); omap_mux_init_gpio(64, OMAP_PIN_OUTPUT);