From patchwork Wed Jan 25 10:25:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manjunathappa, Prakash" X-Patchwork-Id: 137729 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 01B49B6F6F for ; Wed, 25 Jan 2012 21:41:42 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Rq0HU-0003Td-LK; Wed, 25 Jan 2012 10:40:44 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Rq0Gl-0003Hk-Tv; Wed, 25 Jan 2012 10:40:02 +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 q0PAdgNE011770; Wed, 25 Jan 2012 04:39:43 -0600 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 q0PAddlv014244; Wed, 25 Jan 2012 16:09:39 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Wed, 25 Jan 2012 16:09:38 +0530 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with SMTP id q0PAdcx2000789; Wed, 25 Jan 2012 16:09:38 +0530 (IST) Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 8F5C4158002; Wed, 25 Jan 2012 16:09:38 +0530 (IST) Received: from linux-psp-server.india.ext.ti.com (linux-psp-server [192.168.247.76]) by symphony.india.ext.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q0PAdcq00011; Wed, 25 Jan 2012 16:09:38 +0530 (IST) From: "Manjunathappa, Prakash" To: , , Subject: [PATCH v2 3/3] arm: da830: move NAND and NOR devices as aemif MFD slaves Date: Wed, 25 Jan 2012 15:55:56 +0530 Message-ID: <1327487156-10238-3-git-send-email-prakash.pm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1327487156-10238-1-git-send-email-prakash.pm@ti.com> References: <1327487156-10238-1-git-send-email-prakash.pm@ti.com> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.152 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: davinci-linux-open-source@linux.davincidsp.com, Russell King , Samuel Ortiz , Sekhar Nori , "Manjunathappa, Prakash" , David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 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 NAND and NOR device are made as aemif devices slave, hence device registration achieved via aemif MFD driver. Signed-off-by: Manjunathappa, Prakash --- Since v1: Patch is generated using -M option. arch/arm/mach-davinci/board-da830-evm.c | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 0b43554..0ad3662 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -396,14 +396,29 @@ static struct resource da830_evm_nand_resources[] = { }, }; -static struct platform_device da830_evm_nand_device = { - .name = "davinci_nand", - .id = 1, - .dev = { - .platform_data = &da830_evm_nand_pdata, +static struct platform_device da830_evm_devices[] __initdata = { + { + .name = "davinci_nand", + .id = 1, + .dev = { + .platform_data = &da830_evm_nand_pdata, + }, + .num_resources = ARRAY_SIZE(da830_evm_nand_resources), + .resource = da830_evm_nand_resources, + }, +}; + +static struct davinci_aemif_devices da830_emif_devices = { + .devices = da830_evm_devices, + .num_devices = ARRAY_SIZE(da830_evm_devices), +}; + +static struct platform_device davinci_emif_device = { + .name = "davinci_aemif", + .id = -1, + .dev = { + .platform_data = &da830_emif_devices, }, - .num_resources = ARRAY_SIZE(da830_evm_nand_resources), - .resource = da830_evm_nand_resources, }; static inline void da830_evm_init_nand(int mux_mode) @@ -422,7 +437,7 @@ static inline void da830_evm_init_nand(int mux_mode) pr_warning("da830_evm_init: emif25 mux setup failed: %d\n", ret); - ret = platform_device_register(&da830_evm_nand_device); + ret = platform_device_register(&davinci_emif_device); if (ret) pr_warning("da830_evm_init: NAND device not registered.\n");