public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: jon-hunter@ti•com (Jon Hunter)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration
Date: Tue, 3 Jul 2012 10:12:17 -0500	[thread overview]
Message-ID: <4FF30BD1.3040309@ti.com> (raw)
In-Reply-To: <20120703081746.GJ1122@atomide.com>


On 07/03/2012 03:17 AM, Tony Lindgren wrote:
> * Jon Hunter <jon-hunter@ti•com> [120702 10:30]:
>>
>> On 07/02/2012 01:36 AM, Tony Lindgren wrote:
>>>
>>> In general, I doubt that we can come up with better calculations. The existing
>>> code pretty well already follows the device spec timings. And using cycle values
>>> for some registers is the right thing to do according to the connected device
>>> specs no matter what the frequency is. In those cases converting from time values
>>> to cycles does not make sense.
>>
>> Ok agree, but the problem here is how to provide the timings to the
>> driver. The onenand code is doing a lot of rounding based upon the gpmc
>> clock before it presents the timings (in nano-seconds) to the gpmc
>> function to calculate the final timings and program the gpmc
>> chip-select. So therefore I think that we have the following options ...
>>
>> 1. The simplest is to continue using a global variable for storing the
>> gpmc f-clk handle and have the OneNAND timings calculated prior to
>> probing the gpmc driver.
> 
> Well we should not expose gpmc fck handle to the drivers..

Yes, I was hoping we could avoid continuing to do this.

>> 2. Provide some sort of "retime" callback that the gpmc driver can call
>> at probe time to calculate the timings.
> 
> Yes how about the gpmc using driver code registers itself with the gpmc code
> and also registers it's retime function with the gpmc? That way the gpmc fck
> stays inside the gpmc code, and the driver specific retime function should
> be able to do the calculation based on driver clocks. The retime function
> needs to have also a pointer to driver private data for it's clocks etc.
> 
> It seems this retime function may need to be called by the gpmc code when
> L3 changes, and the driver code if the driver is switching between runtime
> and idle clocks like tusb6010 for example does.

Seems fine to me.

Cheers
Jon

  reply	other threads:[~2012-07-03 15:12 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27  6:33 [PATCH v5 0/3] Prepare for GPMC driver conversion Afzal Mohammed
2012-06-27  6:33 ` [PATCH v5 1/3] ARM: OMAP2+: nand: unify init functions Afzal Mohammed
2012-06-27  6:33 ` [PATCH v5 2/3] ARM: OMAP2+: gpmc: handle additional timings Afzal Mohammed
2012-06-27  6:34 ` [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration Afzal Mohammed
2012-06-27 14:58   ` Tony Lindgren
2012-06-28  9:32     ` Mohammed, Afzal
2012-06-28 12:32       ` Tony Lindgren
2012-06-28 12:33         ` Mohammed, Afzal
2012-06-28 12:44         ` Mohammed, Afzal
2012-07-30  7:36           ` Mohammed, Afzal
2012-06-28 16:43         ` Jon Hunter
2012-06-28 19:00           ` Jon Hunter
2012-07-02  6:26             ` Tony Lindgren
2012-06-29  6:15           ` Mohammed, Afzal
2012-06-29  6:38             ` Mohammed, Afzal
2012-06-29 14:15             ` Jon Hunter
2012-07-02 10:04               ` Mohammed, Afzal
2012-07-02  6:36           ` Tony Lindgren
2012-07-02  9:43             ` Mohammed, Afzal
2012-07-02 17:29               ` Jon Hunter
2012-07-03  4:35                 ` Mohammed, Afzal
2012-07-03 15:10                   ` Jon Hunter
2012-07-04  5:36                     ` Mohammed, Afzal
2012-07-02 17:25             ` Jon Hunter
2012-07-03  8:17               ` Tony Lindgren
2012-07-03 15:12                 ` Jon Hunter [this message]
2012-07-04  7:00                 ` Mohammed, Afzal
2012-07-04  7:51                   ` Tony Lindgren
2012-07-05 10:24                     ` Mohammed, Afzal
2012-07-05 10:55                       ` Tony Lindgren
2012-07-05 11:58                         ` Mohammed, Afzal
2012-07-05 14:49                           ` Tony Lindgren
2012-07-05 14:51                         ` Mohammed, Afzal
2012-07-06 12:05                           ` Tony Lindgren
2012-07-10  6:20                             ` Mohammed, Afzal
2012-07-10  9:45                               ` Tony Lindgren
2012-07-10 10:04                                 ` Mohammed, Afzal
2012-07-10 13:17                                   ` Tony Lindgren
2012-07-10 13:47                                     ` Mohammed, Afzal
2012-07-10 17:15                                       ` Jon Hunter
2012-07-11  6:47                                         ` Tony Lindgren
2012-07-13  4:36                                           ` Mohammed, Afzal
2012-08-06 13:38                                           ` gpmc generic retime function (subject was RE: [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration) Mohammed, Afzal
2012-08-17 15:02                                             ` Jon Hunter
2012-08-21 11:14                                               ` Mohammed, Afzal
2012-06-27 10:08 ` [PATCH v5 0/3] Prepare for GPMC driver conversion Mohammed, Afzal

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=4FF30BD1.3040309@ti.com \
    --to=jon-hunter@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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