From patchwork Mon Jul 25 13:07:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hrishikesh Bhandiwad X-Patchwork-Id: 1004302 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6PD9PG1031344 for ; Mon, 25 Jul 2011 13:09:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751212Ab1GYNJY (ORCPT ); Mon, 25 Jul 2011 09:09:24 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:35664 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025Ab1GYNJX (ORCPT ); Mon, 25 Jul 2011 09:09:23 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p6PD9KMB029815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Jul 2011 08:09:20 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep33.itg.ti.com (8.13.7/8.13.8) with ESMTP id p6PD9K9u001735; Mon, 25 Jul 2011 08:09:20 -0500 (CDT) Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p6PD9D2W011116; Mon, 25 Jul 2011 08:09:19 -0500 (CDT) 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, 25 Jul 2011 18:37:27 +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 p6PD7Ne6016722; Mon, 25 Jul 2011 18:37:25 +0530 (IST) From: Hrishikesh Bhandiwad To: , CC: Hrishikesh Bhandiwad Subject: [PATCH] OMAP3: Beagle: NAND: Specifying partition offsets directly. Date: Mon, 25 Jul 2011 18:37:23 +0530 Message-ID: <1311599243-875-1-git-send-email-hrishikesh.b@ti.com> X-Mailer: git-send-email 1.6.2.4 MIME-Version: 1.0 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.6 (demeter1.kernel.org [140.211.167.41]); Mon, 25 Jul 2011 13:09:25 +0000 (UTC) In the nand partition table specifying the offset addresses directly instead of using the macro MTDPART_OFS_APPEND to gain runtime efficiency while nand initialization. MTDPART_OFS_APPEND has the value (-1) ,if assigned to offset, a runtime calculation of actual offset happens each time nand is initialized [ Refer: drivers/mtd/mtdpart.c: allocate_partition()]. To avoid this , specify actual offset. Signed-off-by: Hrishikesh Bhandiwad --- arch/arm/mach-omap2/board-omap3beagle.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 7f21d24..09f7571 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -140,23 +140,23 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { }, { .name = "U-Boot", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ + .offset = 0x80000 .size = 15 * NAND_BLOCK_SIZE, .mask_flags = MTD_WRITEABLE, /* force read-only */ }, { .name = "U-Boot Env", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ + .offset = 0x260000 .size = 1 * NAND_BLOCK_SIZE, }, { .name = "Kernel", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ + .offset = 0x280000 .size = 32 * NAND_BLOCK_SIZE, }, { .name = "File System", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ + .offset = 0x680000 .size = MTDPART_SIZ_FULL, }, };