All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Jon Hunter <jon-hunter@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	linux-arm <linux-arm-kernel@lists.infradead.org>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Philip Avinash <avinashphilip@ti.com>,
	Grazvydas Ignotas <notasas@gmail.com>
Subject: Re: [PATCH] ARM: OMAP2+: Fix broken gpmc support
Date: Mon, 4 Mar 2013 09:33:26 -0800	[thread overview]
Message-ID: <20130304173326.GJ11806@atomide.com> (raw)
In-Reply-To: <1361195859-5949-1-git-send-email-jon-hunter@ti.com>

* Jon Hunter <jon-hunter@ti.com> [130218 06:01]:
> Commit "ARM: OMAP2+: Prevent potential crash if GPMC probe fails" added
> code to ensure that GPMC chip-selects could not be requested until the
> device probe was successful. The chip-selects should have been
> unreserved at the end of the probe function, but the code to unreserve
> them appears to have ended up in the gpmc_calc_timings() function and
> hence, this is causing problems requesting chip-selects. Fix this merge
> error by unreserving the chip-selects at the end of the probe, but
> before we call the gpmc child probe functions (for device-tree) which
> request a chip-select.
> 
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> Tested-by: Philip Avinash <avinashphilip@ti.com>
> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
> 
> Tony, GPMC support is completely broken in linux-next without this fix
> and a few people now are reporting this problem. Can we get this fix
> merged?

Thanks applying now into omap-for-v3.9-rc1/fixes. Sorry for the delay,
looks like I should have applied this earlier.

Regards,

Tony
 
>  arch/arm/mach-omap2/gpmc.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index 1adb2d4..1e8bcb4 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -1125,9 +1125,6 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
>  	/* TODO: remove, see function definition */
>  	gpmc_convert_ps_to_ns(gpmc_t);
>  
> -	/* Now the GPMC is initialised, unreserve the chip-selects */
> -	gpmc_cs_map = 0;
> -
>  	return 0;
>  }
>  
> @@ -1388,6 +1385,9 @@ static int gpmc_probe(struct platform_device *pdev)
>  	if (IS_ERR_VALUE(gpmc_setup_irq()))
>  		dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
>  
> +	/* Now the GPMC is initialised, unreserve the chip-selects */
> +	gpmc_cs_map = 0;
> +
>  	rc = gpmc_probe_dt(pdev);
>  	if (rc < 0) {
>  		clk_disable_unprepare(gpmc_l3_clk);
> -- 
> 1.7.10.4
> 

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: Fix broken gpmc support
Date: Mon, 4 Mar 2013 09:33:26 -0800	[thread overview]
Message-ID: <20130304173326.GJ11806@atomide.com> (raw)
In-Reply-To: <1361195859-5949-1-git-send-email-jon-hunter@ti.com>

* Jon Hunter <jon-hunter@ti.com> [130218 06:01]:
> Commit "ARM: OMAP2+: Prevent potential crash if GPMC probe fails" added
> code to ensure that GPMC chip-selects could not be requested until the
> device probe was successful. The chip-selects should have been
> unreserved at the end of the probe function, but the code to unreserve
> them appears to have ended up in the gpmc_calc_timings() function and
> hence, this is causing problems requesting chip-selects. Fix this merge
> error by unreserving the chip-selects at the end of the probe, but
> before we call the gpmc child probe functions (for device-tree) which
> request a chip-select.
> 
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> Tested-by: Philip Avinash <avinashphilip@ti.com>
> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
> 
> Tony, GPMC support is completely broken in linux-next without this fix
> and a few people now are reporting this problem. Can we get this fix
> merged?

Thanks applying now into omap-for-v3.9-rc1/fixes. Sorry for the delay,
looks like I should have applied this earlier.

Regards,

Tony
 
>  arch/arm/mach-omap2/gpmc.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index 1adb2d4..1e8bcb4 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -1125,9 +1125,6 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
>  	/* TODO: remove, see function definition */
>  	gpmc_convert_ps_to_ns(gpmc_t);
>  
> -	/* Now the GPMC is initialised, unreserve the chip-selects */
> -	gpmc_cs_map = 0;
> -
>  	return 0;
>  }
>  
> @@ -1388,6 +1385,9 @@ static int gpmc_probe(struct platform_device *pdev)
>  	if (IS_ERR_VALUE(gpmc_setup_irq()))
>  		dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
>  
> +	/* Now the GPMC is initialised, unreserve the chip-selects */
> +	gpmc_cs_map = 0;
> +
>  	rc = gpmc_probe_dt(pdev);
>  	if (rc < 0) {
>  		clk_disable_unprepare(gpmc_l3_clk);
> -- 
> 1.7.10.4
> 

  reply	other threads:[~2013-03-04 17:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 13:57 [PATCH] ARM: OMAP2+: Fix broken gpmc support Jon Hunter
2013-02-18 13:57 ` Jon Hunter
2013-03-04 17:33 ` Tony Lindgren [this message]
2013-03-04 17:33   ` Tony Lindgren

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=20130304173326.GJ11806@atomide.com \
    --to=tony@atomide.com \
    --cc=avinashphilip@ti.com \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=jon-hunter@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=notasas@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.