From: Mark Jackson <mpfj-list@mimc.co.uk>
To: "Mohammed, Afzal" <afzal@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
"tony@atomide.com >> Tony Lindgren" <tony@atomide.com>
Subject: Re: gpmc_cs_request() causes early boot hang
Date: Mon, 24 Sep 2012 12:26:32 +0100 [thread overview]
Message-ID: <50604368.8030202@mimc.co.uk> (raw)
In-Reply-To: <C8443D0743D26F4388EA172BF4E2A7A93E9E7881@DBDE01.ent.ti.com>
On 24/09/12 12:13, Mohammed, Afzal wrote:
> 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<-------------------
>
> 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)
> {
> ----8<----------------
Perfect !!
I also got it working by adding "late_init()" hooks into arch/arm/kernel/setup.c, but your code is
much simpler.
Regards
Mark J.
prev parent reply other threads:[~2012-09-24 11:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 19:27 gpmc_cs_request() causes early boot hang Mark Jackson
2012-09-21 23:13 ` Tony Lindgren
2012-09-24 4:51 ` Mohammed, Afzal
2012-09-24 10:51 ` Mark Jackson
2012-09-24 11:13 ` Mohammed, Afzal
2012-09-24 11:26 ` Mark Jackson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50604368.8030202@mimc.co.uk \
--to=mpfj-list@mimc.co.uk \
--cc=afzal@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).