From patchwork Fri Apr 22 11:08:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: charu@ti.com X-Patchwork-Id: 727001 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3MB5Jo8028466 for ; Fri, 22 Apr 2011 11:05:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754993Ab1DVLFR (ORCPT ); Fri, 22 Apr 2011 07:05:17 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:38699 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755150Ab1DVLE7 (ORCPT ); Fri, 22 Apr 2011 07:04:59 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p3MB4asF001557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Apr 2011 06:04:39 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p3MB4XMk028986; Fri, 22 Apr 2011 16:34:34 +0530 (IST) 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; Fri, 22 Apr 2011 16:34:15 +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 p3MB4TuQ021567; Fri, 22 Apr 2011 16:34:30 +0530 (IST) Received: from x0084895-pc (unknown [10.24.244.78]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id A0ACA158003; Fri, 22 Apr 2011 16:34:29 +0530 (IST) From: Charulatha V To: , CC: , , , Charulatha V Subject: [RFC PATCH 01/18] OMAP1: GPIO: Fix mpuio_init() call Date: Fri, 22 Apr 2011 16:38:15 +0530 Message-ID: <1303470512-19671-2-git-send-email-charu@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1303470512-19671-1-git-send-email-charu@ti.com> References: <1303470512-19671-1-git-send-email-charu@ti.com> 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]); Fri, 22 Apr 2011 11:05:19 +0000 (UTC) In OMAP1 GPIO, MPUIO bank's initialization is called as part of omap_gpio_sysinit() which is an "arch_initcall". mpuio_init() relies on the gpio_bank pointer of MPUIO bank whose memory is allocated only during omap_gpio_probe(). Hence move mpuio_init() call as part of probe after the gpio_bank pointer is initialized. Signed-off-by: Charulatha V --- arch/arm/plat-omap/gpio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index d2adcdd..9164bd4 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -1697,6 +1697,8 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev) ret = init_gpio_info(pdev); if (ret) return ret; + if (cpu_class_is_omap1()) + mpuio_init(); } id = pdev->id; @@ -2110,8 +2112,6 @@ static int __init omap_gpio_sysinit(void) { int ret = 0; - mpuio_init(); - #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) if (cpu_is_omap16xx() || cpu_class_is_omap2()) { if (ret == 0) {