From patchwork Fri Aug 19 10:14:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hrishikesh Bhandiwad X-Patchwork-Id: 110582 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 B5297B6F62 for ; Fri, 19 Aug 2011 20:17:21 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuM8D-0004On-NO; Fri, 19 Aug 2011 10:16:53 +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 1QuM8D-0002bI-7y; Fri, 19 Aug 2011 10:16:53 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuM88-0002ay-CI for linux-mtd@lists.infradead.org; Fri, 19 Aug 2011 10:16:49 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7JAGhV4027891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Aug 2011 05:16:45 -0500 Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7JAGfFg018608; Fri, 19 Aug 2011 15:46:42 +0530 (IST) Received: from dbde03.ent.ti.com ([172.24.170.146]) by dbde70.ent.ti.com ([172.24.170.148]) with mapi; Fri, 19 Aug 2011 15:46:41 +0530 From: "Bhandiwad, Hrishikesh" To: "Bhandiwad, Hrishikesh" , "linux-omap@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" Date: Fri, 19 Aug 2011 15:44:59 +0530 Subject: RE: [PATCH] AM3517: NAND: Adding NAND support and specifying NAND partitions. Thread-Topic: [PATCH] AM3517: NAND: Adding NAND support and specifying NAND partitions. Thread-Index: AcxTYm3Bvmpx7tciQDuFo+wfz50GUQK9mxz4 Message-ID: References: <1312543549-31869-1-git-send-email-hrishikesh.b@ti.com> In-Reply-To: <1312543549-31869-1-git-send-email-hrishikesh.b@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110819_061648_585660_01148742 X-CRM114-Status: GOOD ( 18.26 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [198.47.26.152 listed in list.dnswl.org] -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 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 Hi Tony, As this patch is trivial , can it be upstreamed . Thanks & Regards, Hrishikesh diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 63af417..dceb996 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include @@ -39,6 +41,7 @@ #include "mux.h" #include "control.h" +#include "common-board-devices.h" #define AM35XX_EVM_MDIO_FREQUENCY (1000000) @@ -460,6 +463,37 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata) static struct omap_board_config_kernel am3517_evm_config[] __initdata = { }; +static struct mtd_partition am3517_nand_partitions[] = { + /* All the partition sizes are listed in terms of NAND block size */ + { + .name = "X-Loader", + .offset = 0, + .size = 4 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, + { + .name = "U-Boot", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ + .size = 15 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, + { + .name = "U-Boot Env", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ + .size = 1 * NAND_BLOCK_SIZE, + }, + { + .name = "Kernel", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ + .size = 32 * NAND_BLOCK_SIZE, + }, + { + .name = "File System", + .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ + .size = MTDPART_SIZ_FULL, + }, +}; + static void __init am3517_evm_init(void) { omap_board_config = am3517_evm_config; @@ -473,6 +507,10 @@ static void __init am3517_evm_init(void) /* Configure GPIO for EHCI port */ omap_mux_init_gpio(57, OMAP_PIN_OUTPUT); usbhs_init(&usbhs_bdata); + /*NAND*/ + omap_nand_flash_init(NAND_BUSWIDTH_16, am3517_nand_partitions, + ARRAY_SIZE(am3517_nand_partitions)); + am3517_evm_hecc_init(&am3517_evm_hecc_pdata); /* DSS */ am3517_evm_display_init();