All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <mike@compulab.co.il>
To: "Ghorai, Sukumar" <s-ghorai@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH] OMAP: fix gpmc nand setup when no timings supplied
Date: Thu, 22 Apr 2010 09:59:13 +0300	[thread overview]
Message-ID: <4BCFF3C1.5070005@compulab.co.il> (raw)
In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B030D5D7ADD@dbde02.ent.ti.com>

Ghorai, Sukumar wrote:
> 
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>> owner@vger.kernel.org] On Behalf Of Mike Rapoport
>> Sent: 2010-04-22 10:50
>> To: linux-omap@vger.kernel.org
>> Cc: Tony Lindgren; Mike Rapoport
>> Subject: Re: [PATCH] OMAP: fix gpmc nand setup when no timings supplied
>>
>> Any comments on this?
>>
>> Mike Rapoport wrote:
>>> The gpmc nand infrastructure crashes when there no timing structure
>>> supplied in the omap_nand_platform_data. Adding check for
>>> gpmc_nand_data->gpmc_t pointer validity resolves the crash and allows to
>>> continue nand initialization without modifying gpmc timings.
>>>
>>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>>> ---
>>>  arch/arm/mach-omap2/gpmc-nand.c |    5 +++++
>>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-
>> nand.c
>>> index 64d74f0..3629da3 100644
>>> --- a/arch/arm/mach-omap2/gpmc-nand.c
>>> +++ b/arch/arm/mach-omap2/gpmc-nand.c
>>> @@ -83,6 +83,11 @@ static int gpmc_nand_setup(void)
>>>  {
>>>  	struct device *dev = &gpmc_nand_device.dev;
>>>
>>> +	if (!gpmc_nand_data->gpmc_t) {
>>> +		dev_info(dev, "Keeping gpmc timings\n");
>>> +		return 0;
>>> +	}
> [Ghorai] This is the only time its setup the gpmc timings for NAND. And it should return as error.

Somehow I was under the impression that X-Loader sets up the NAND 
timings even if booted from OneNAND or MMC. Apparently I'm wrong :).

What do you think about adding a flag to omap_nand_platform_data that 
will allow to keep timings if they were already configured by the 
bootloader? This is really useful when the board can be assembled with 
different kinds of NAND flashes.

>>> +
>>>  	/* Set timings in GPMC */
>>>  	if (omap2_nand_gpmc_retime() < 0) {
>>>  		dev_err(dev, "Unable to set gpmc timings\n");
>>
>> --
>> Sincerely yours,
>> Mike.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Sincerely yours,
Mike.

  reply	other threads:[~2010-04-22  7:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19  9:50 [PATCH] OMAP: fix gpmc nand setup when no timings supplied Mike Rapoport
2010-04-22  5:19 ` Mike Rapoport
2010-04-22  6:41   ` Ghorai, Sukumar
2010-04-22  6:59     ` Mike Rapoport [this message]
2010-04-22  7:59       ` Ghorai, Sukumar
2010-04-22  8:45         ` Mike Rapoport
2010-04-26 18:14           ` Tony Lindgren
2010-04-27  5:07             ` Vimal Singh
2010-04-27  7:43             ` Mike Rapoport
2010-04-27 14:47               ` Tony Lindgren
2010-04-28 15:05                 ` Bug in omap2_nand_gpmc_retime? (was: Re: [PATCH] OMAP: fix gpmc nand setup when no timings supplied) Mike Rapoport
2010-04-28 15:26                   ` Vimal Singh
2010-04-28 15:40                     ` Bug in omap2_nand_gpmc_retime? Mike Rapoport

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=4BCFF3C1.5070005@compulab.co.il \
    --to=mike@compulab.co.il \
    --cc=linux-omap@vger.kernel.org \
    --cc=s-ghorai@ti.com \
    --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 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.