From patchwork Mon Sep 24 11:13:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Afzal Mohammed X-Patchwork-Id: 1497381 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 60F81DF280 for ; Mon, 24 Sep 2012 11:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752468Ab2IXLNg (ORCPT ); Mon, 24 Sep 2012 07:13:36 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:35316 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520Ab2IXLNf (ORCPT ); Mon, 24 Sep 2012 07:13:35 -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 q8OBDGSj022479; Mon, 24 Sep 2012 06:13:17 -0500 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 q8OBDEnh003196; Mon, 24 Sep 2012 16:43:15 +0530 (IST) Received: from DBDE01.ent.ti.com ([fe80::d5df:c4b5:9919:4e10]) by DBDE70.ent.ti.com ([fe80::2141:513f:409:315a%21]) with mapi id 14.01.0323.003; Mon, 24 Sep 2012 16:43:14 +0530 From: "Mohammed, Afzal" To: Mark Jackson CC: "linux-omap@vger.kernel.org" , lkml , "tony@atomide.com >> Tony Lindgren" Subject: RE: gpmc_cs_request() causes early boot hang Thread-Topic: gpmc_cs_request() causes early boot hang Thread-Index: AQHNmC9WQXyKDMW1okeEKCbWWvFUTZeY7CwAgAAMaQCAAF9BgA== Date: Mon, 24 Sep 2012 11:13:14 +0000 Message-ID: References: <505CBFAA.3080604@mimc.co.uk> <50603B3C.8070402@mimc.co.uk> In-Reply-To: <50603B3C.8070402@mimc.co.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.24.170.142] MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi Mark, On Mon, Sep 24, 2012 at 16:21:40, Mark Jackson wrote: > On 24/09/12 05:51, Mohammed, Afzal wrote: > > It seems you are using PSP Kernel. > > > > Invoking omap_init_gpmc before gpmc request should help. > > Okay ... I'm now using earlyprintk and omap_init_gpmc(), but I still get boot hangs. > Surely omap-gpmc needs to be setup before any calls such as gpmc_cs_request() ? > > Is there a method to delay my test code, or maybe get the omap-gpmc registered earlier ? Hope below patch helps you (untested) Regards Afzal ----8<------------------- ----8<---------------- diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 1c53c05..a4c6912 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -827,7 +827,19 @@ static struct platform_driver gpmc_driver = { }, }; -module_platform_driver(gpmc_driver); +static __init int gpmc_init(void) +{ + return platform_driver_register(&gpmc_driver); +} + +static __exit void gpmc_exit(void) +{ + platform_driver_unregister(&gpmc_driver); + +} + +postcore_initcall(gpmc_init); +module_exit(gpmc_exit); int gpmc_suspend(void) {