From patchwork Mon Sep 19 13:24:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saxena, Parth" X-Patchwork-Id: 115336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8FC8AB6F9D for ; Mon, 19 Sep 2011 23:24:37 +1000 (EST) Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R5dpc-0004Bg-PN; Mon, 19 Sep 2011 13:24:22 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1R5dpc-0003Vi-7Z; Mon, 19 Sep 2011 13:24:20 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R5dpY-0003UC-MX for linux-mtd@lists.infradead.org; Mon, 19 Sep 2011 13:24:17 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p8JDOCTS019843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Sep 2011 08:24:14 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p8JDOB3w023226; Mon, 19 Sep 2011 18:54:11 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 8.3.106.1; Mon, 19 Sep 2011 18:54:11 +0530 Received: from localhost.localdomain (dbdp20.itg.ti.com [172.24.170.38]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p8JDO88i000107; Mon, 19 Sep 2011 18:54:09 +0530 (IST) From: "Saxena, Parth" To: Subject: [PATCH] ti816x: add support for nand on ti8168 evm Date: Mon, 19 Sep 2011 18:54:08 +0530 Message-ID: <1316438648-25760-1-git-send-email-parth.saxena@ti.com> X-Mailer: git-send-email 1.6.2.4 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110919_092416_923501_9061B212 X-CRM114-Status: GOOD ( 14.52 ) X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [198.47.26.153 listed in list.dnswl.org] -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: tony@atomide.com, "Basheer, Mansoor Ahamed" , "Saxena, Parth" , linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add partition table for NAND device on TI8168 EVM and initialise the NAND module. Signed-off-by: Saxena, Parth Signed-off-by: Basheer, Mansoor Ahamed --- This patch is tested on top of linux-omap/master and Hemant's patches submitted recently. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg53457.html http://www.mail-archive.com/linux-omap@vger.kernel.org/msg54296.html arch/arm/mach-omap2/board-ti8168evm.c | 39 +++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c index e516a04..87953bb 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@ -14,6 +14,7 @@ */ #include #include +#include #include #include @@ -23,6 +24,42 @@ #include #include #include +#include +#include + +#include "board-flash.h" + +#define NAND_BLOCK_SIZE SZ_128K + +static struct mtd_partition ti816x_nand_partitions[] = { +/* All the partition sizes are listed in terms of NAND block size */ + { + .name = "U-Boot", + .offset = 0, /* Offset = 0x0 */ + .size = 18 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, + { + .name = "U-Boot Env", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x240000 */ + .size = 2 * NAND_BLOCK_SIZE, + }, + { + .name = "Kernel", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ + .size = 34 * NAND_BLOCK_SIZE, + }, + { + .name = "File System", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x6C0000 */ + .size = 1601 * NAND_BLOCK_SIZE, + }, + { + .name = "Reserved", + .offset = MTDPART_OFS_APPEND, /* Offset = 0xCEE0000 */ + .size = MTDPART_SIZ_FULL, + }, +}; static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { }; @@ -35,6 +72,8 @@ static void __init ti8168_init_early(void) static void __init ti8168_evm_init(void) { + board_nand_init(ti816x_nand_partitions, + ARRAY_SIZE(ti816x_nand_partitions), 0, NAND_BUSWIDTH_16); omap_serial_init(); omap_board_config = ti8168_evm_config; omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);