From patchwork Wed Jan 13 07:03:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vimal singh X-Patchwork-Id: 72517 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.2) with ESMTP id o0D73arW006759 for ; Wed, 13 Jan 2010 07:03:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754860Ab0AMHDf (ORCPT ); Wed, 13 Jan 2010 02:03:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753381Ab0AMHDf (ORCPT ); Wed, 13 Jan 2010 02:03:35 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:45169 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323Ab0AMHDe (ORCPT ); Wed, 13 Jan 2010 02:03:34 -0500 Received: by bwz27 with SMTP id 27so1718874bwz.21 for ; Tue, 12 Jan 2010 23:03:33 -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=v+U4uE5XfhaUxVUBAAriQfwddlj6QhIl2GfwjAw3Mms=; b=qRKL55mrM6iygBVCxbODLQlY62/ERaQ4THcQ/j6Ls2ry/vwtBx6duwHaYYf+9oeNMp O2pz6idOf9Tr/uNvQWIwKADaa2FacVdbPVRLo/4VkNQ7rhOFtDbyO9j5ZYdfX7EOng0H CcyqPfeMkPu5mpjtKmdR+i+BwIIrRqlTNmJeo= 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=Wuah0Wlg7iXorcVzMuVi0inA/SL8UAD7NDZNzsvNU3WSm2O26pTb29Gb7BA2wHm4oB bVZDwCoz/agXttHBgkacRLQA81a3Z3gbhk9CnCdIPH0TbSTJ2FrH06JzcaKqRDRRGNnV IeoVfHMUaiLOwU6CXE06zHL/QATLABJqaGg9U= MIME-Version: 1.0 Received: by 10.204.10.136 with SMTP id p8mr2637232bkp.56.1263366213233; Tue, 12 Jan 2010 23:03:33 -0800 (PST) From: Vimal Singh Date: Wed, 13 Jan 2010 12:33:13 +0530 Message-ID: Subject: [PATCH 2/3] OMAP3: Add support for NAND on ZOOM2 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 c74437c..434310e 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ board-rx51-peripherals.o \ mmc-twl4030.o obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ + board-zoom-flash.o \ board-zoom-peripherals.o \ mmc-twl4030.o \ board-zoom-debugboard.o diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index bb87cf7..9fa8bcf 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c @@ -77,10 +77,59 @@ static struct omap_board_mux board_mux[] #define board_mux NULL #endif +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_zoom2_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); zoom_peripherals_init(); + zoom_flash_init(zoom_flash_partitions, ZOOM_NAND_CS); zoom_debugboard_init(); }