From patchwork Tue May 5 00:26:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 21796 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n450Qlep026757 for ; Tue, 5 May 2009 00:26:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754587AbZEEA04 (ORCPT ); Mon, 4 May 2009 20:26:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755934AbZEEA04 (ORCPT ); Mon, 4 May 2009 20:26:56 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:65180 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754587AbZEEA04 (ORCPT ); Mon, 4 May 2009 20:26:56 -0400 Received: from c-67-160-239-110.hsd1.ca.comcast.net ([67.160.239.110] helo=[127.0.0.1]) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1M18Up-000Osh-5z; Tue, 05 May 2009 00:26:55 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 67.160.239.110 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/aHXy7ixiyc85tTNxsrC7A Subject: [PATCH 6/7] onenand init: Convert omap3430sdp to use gpmc-onenand To: dedekind@infradead.org, juha.yrjola@solidboot.com, linux-omap@vger.kernel.org, adrian.hunter@nokia.com From: Tony Lindgren Date: Mon, 04 May 2009 17:26:54 -0700 Message-ID: <20090505002654.2894.43754.stgit@localhost> In-Reply-To: <20090505002144.2894.25201.stgit@localhost> References: <20090505002144.2894.25201.stgit@localhost> User-Agent: StGit/0.14.3.347.g594a MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Convert omap3430sdp to use gpmc-onenand. Note that sync mode does not seem to work for some reason, so disable it with flags. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-3430sdp-flash.c | 28 ++-------------------------- 1 files changed, 2 insertions(+), 26 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/board-3430sdp-flash.c b/arch/arm/mach-omap2/board-3430sdp-flash.c index f0e25a4..e0ea564 100644 --- a/arch/arm/mach-omap2/board-3430sdp-flash.c +++ b/arch/arm/mach-omap2/board-3430sdp-flash.c @@ -103,8 +103,6 @@ static struct platform_device sdp_nor_device = { .resource = &sdp_nor_resource, }; -static int sdp_onenand_setup(void __iomem *, int freq); - static struct mtd_partition sdp_onenand_partitions[] = { { .name = "X-Loader-OneNAND", @@ -138,30 +136,9 @@ static struct mtd_partition sdp_onenand_partitions[] = { static struct omap_onenand_platform_data sdp_onenand_data = { .parts = sdp_onenand_partitions, .nr_parts = ARRAY_SIZE(sdp_onenand_partitions), - .onenand_setup = sdp_onenand_setup, .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ }; -static struct platform_device sdp_onenand_device = { - .name = "omap2-onenand", - .id = -1, - .dev = { - .platform_data = &sdp_onenand_data, - }, -}; - -/* - * sdp_onenand_setup - The function configures the onenand flash. - * @onenand_base: Onenand base address - * - * @return int: Currently always returning zero. - */ -static int sdp_onenand_setup(void __iomem *onenand_base, int freq) -{ - /* Onenand setup does nothing at present */ - return 0; -} - static struct mtd_partition sdp_nand_partitions[] = { /* All the partition sizes are listed in terms of NAND block size */ { @@ -262,7 +239,7 @@ void __init sdp3430_flash_init(void) } else { ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); if ((ret & 0x3F) == (ONENAND_MAP >> 24)) - onenandcs = cs; + onenandcs = cs; } cs++; } @@ -284,7 +261,6 @@ void __init sdp3430_flash_init(void) if (onenandcs < GPMC_CS_NUM) { sdp_onenand_data.cs = onenandcs; - if (platform_device_register(&sdp_onenand_device) < 0) - printk(KERN_ERR "Unable to register OneNAND device\n"); + gpmc_onenand_init(&sdp_onenand_data); } }