From: Mike Rapoport <mike@compulab.co.il>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, vimal.newwork@gmail.com,
s-ghorai@ti.com, Mike Rapoport <mike@compulab.co.il>
Subject: Re: [PATCH v2 3/3] omap: gpmc-nand: add ability to keep timings defined by the bootloader
Date: Tue, 04 May 2010 16:22:26 +0300 [thread overview]
Message-ID: <4BE01F92.70302@compulab.co.il> (raw)
In-Reply-To: <20100503211628.GZ29604@atomide.com>
Tony Lindgren wrote:
> * Mike Rapoport <mike.rapoport@gmail.com> [100503 13:28]:
>> So it comes down to what provides better tolerance, the explicit NAND
>> timings in nanosecs or (rounded) timings in ticks derived from
>> bootloader settings...
>
> My experience is that you can get the nanosec timings from the device
> datasheet(s) and that just should work for any L3 frequency.
And what about boards that can have different NAND flash chips
assembled? What datasheet should be used to get the nanosecs? Note, that
detecting NAND ID in the bootloader and adjusting timings appropriately
is not that big deal, and doing it in the kernel seems to me really
impractical.
> My experience is also that trying to do it the other way around won't work
> because of rounding errors. Trying to produce nanosecond values out
> of the tick values just is not accurate enough.
I'm still not convinced. Similar approach worked for me with several
devices attached to sort of GPMC controllers on different SoC. There
always was a way to set timings once in the bootloader and then detect
the timings in the kernel and update them during cpu-freq transitions...
> That's why gpmc-onenand.c and usb-tusb6010.c timings are done the way
> they are, and they're known to work at various L3 frequencies.
I'm not really familiar with OneNAND, but looking at gpmc-onenand.c I
see hardcoded timings. Moreover, the nanosecs values seem to get
adjusted for different L3 frequencies.
So, for NAND it would mean that platform would have to supply several
timing sets for different L3 freqs?
>>> So maybe just not do anything, and print a warning on gpmc L3 changes
>>> if the timings are not set?
>> I don't quite understand where exactly this warning should go. I
>> haven't found any treatment of L3 frequency changes in gpmc related
>> code neither in linux-omap nor in linux-omap-pm...
>
> Ah, right. There's currently nothing doing that.. That would have to
> be done based on cpufreq notifiers (or clock notifiers). But we don't
> have any of that at least in the mainline yet. Hmm I don't even think
> we currently scale the L3 for cpufreq.. Right now the best way to test
> would be by booting at different L3 frequencies.
>
> Anyways, my point is that setting gpmc_default_timings based on the
> bootloader after doing the gpmc_cs_get_timings is most likely unsafe
> for other L3 frequencies.
>
> Regards,
>
> Tony
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2010-05-04 13:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 8:48 [PATCH v2 0/3] omap: gpmc-nand: add ability to keep timings defined by the bootloader Mike Rapoport
2010-04-29 8:48 ` [PATCH v2 1/3] omap: gpmc: add gpmc_cs_get_timings Mike Rapoport
2010-04-29 8:48 ` [PATCH v2 2/3] omap: gpmc-nand: introduce omap2_nand_gpmc_round_timings helper Mike Rapoport
2010-04-29 8:48 ` [PATCH v2 3/3] omap: gpmc-nand: add ability to keep timings defined by the bootloader Mike Rapoport
2010-05-03 18:24 ` Tony Lindgren
2010-05-03 20:32 ` Mike Rapoport
2010-05-03 21:16 ` Tony Lindgren
2010-05-04 13:22 ` Mike Rapoport [this message]
2010-05-04 21:46 ` 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=4BE01F92.70302@compulab.co.il \
--to=mike@compulab.co.il \
--cc=linux-omap@vger.kernel.org \
--cc=s-ghorai@ti.com \
--cc=tony@atomide.com \
--cc=vimal.newwork@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.