From patchwork Tue May 1 12:22:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Afzal X-Patchwork-Id: 156114 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 B7CEAB6FA8 for ; Tue, 1 May 2012 23:16:34 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SPCun-0003ZR-Qu; Tue, 01 May 2012 13:14:50 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SPCMQ-0000NL-2P; Tue, 01 May 2012 12:39:20 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q41Cd464020256; Tue, 1 May 2012 07:39:04 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q41Cd4l3027362; Tue, 1 May 2012 07:39:04 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Tue, 1 May 2012 07:39:04 -0500 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with SMTP id q41CcxS8012232; Tue, 1 May 2012 07:38:59 -0500 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 822DF158003; Tue, 1 May 2012 18:08:58 +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 q41CcwI18669; Tue, 1 May 2012 18:08:58 +0530 (IST) From: Afzal Mohammed To: , , , , , , , , , , , , , , , , Subject: [PATCH v4 23/39] ARM: OMAP2+: board 3630sdp: gpmc driver adaptation Date: Tue, 1 May 2012 17:52:15 +0530 Message-ID: <7762bf10ee38177a070b84e8e42f7853e48f569b.1335874494.git.afzal@ti.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.94.94.41 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: Afzal Mohammed 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 gpmc code has been converted to driver. Modify the board code to provide gpmc driver with required information. Signed-off-by: Afzal Mohammed --- arch/arm/mach-omap2/board-3630sdp.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 143e47f..4e0298a 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c @@ -27,18 +27,29 @@ #include "mux.h" #include "sdram-hynix-h8mbx00u0mer-0em.h" +static struct gpmc_device_pdata *gpmc_device_data[4]; +static struct gpmc_device_pdata **gpmc_cur = gpmc_device_data; + +static struct gpmc_pdata gpmc_data = { + .device_pdata = gpmc_device_data, +}; + #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) static struct omap_smc91x_platform_data board_smc91x_data = { .cs = 3, .flags = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL, .skip_timing = true, + .gpio_irq = 158, }; static void __init board_smc91x_init(void) { - board_smc91x_data.gpio_irq = 158; - gpmc_smc91x_init(&board_smc91x_data); + *gpmc_cur = gpmc_smc91x_init(&board_smc91x_data); + if (*gpmc_cur) + gpmc_data.num_device++, gpmc_cur++; + else + pr_err("error: unable to initilaize gpmc smsc911x\n"); } #else @@ -204,9 +215,13 @@ static void __init omap_sdp_init(void) omap_sdrc_init(h8mbx00u0mer0em_sdrc_params, h8mbx00u0mer0em_sdrc_params); zoom_display_init(); + board_smc91x_init(); - board_flash_init(sdp_flash_partitions, chip_sel_sdp, - NAND_BUSWIDTH_16, NULL); + gpmc_data.num_device += board_flash_init(sdp_flash_partitions, + chip_sel_sdp, NAND_BUSWIDTH_16, + gpmc_cur) - gpmc_cur; + omap_init_gpmc(&gpmc_data); + enable_board_wakeup_source(); usbhs_init(&usbhs_bdata); }