All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Mohammed, Afzal" <afzal@ti.com>
Cc: "Hunter, Jon" <jon-hunter@ti.com>,
	"paul@pwsan.com" <paul@pwsan.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration
Date: Wed, 4 Jul 2012 00:51:59 -0700	[thread overview]
Message-ID: <20120704075158.GQ1122@atomide.com> (raw)
In-Reply-To: <C8443D0743D26F4388EA172BF4E2A7A93E9A2BAC@DBDE01.ent.ti.com>

* Mohammed, Afzal <afzal@ti.com> [120704 00:05]:
> Hi Tony,
> 
> On Tue, Jul 03, 2012 at 13:47:47, Tony Lindgren wrote:
> > * Jon Hunter <jon-hunter@ti.com> [120702 10:30]:
> 
> > > 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.
> 
> Sorry, not sure whether I follow you properly, based on what has been
> understood, will try to rephrase,
> 
> All the present gpmc timing calculation done in arch/arm/mach-omap2/gpmc-*
> to be moved to gpmc driver. And all the peripheral drivers using gpmc, i.e
> like smsc911x, tusb6010 needs to register their retime function with gpmc
> driver. And gpmc driver will invoke these registered retime function, when
> clock frequency changes.
> 
> But wouldn't it need changes in the existing drivers like smsc911x that are
> used by multiple architectures with gpmc specific registration (put under
> a macro ?). We will be having gpmc driver code that contains knowledge
> about peripheral timing calculation, seems there is no way out of this.
> Peripheral agnostic gpmc code may not happen it seems

It depends. For some drivers scaling both gpmc clock and the device clock
can happen, like with tusb6010 for example. But the smsc911x does not know
about the clocks.. So to additional changes to the driver would be required
to if device clocks need scaling. But for now, we should be able to do it
at gpmc level with the retime function, or just disable DFS for those clocks
if not supported.

The ideal solution in the long run would be to have gpmc scaling frequency
as the bus and device scaling frequency using cpufreq/devicefreq whatever
notifiers.
 
> In that case gpmc driver probe would have to be relieved of the task of
> setting up gpmc timings as we have to wait till peripheral drivers
> register their callback, right ?, seems in that case no timing information
> needs (or can be) to be passed from DT

Well we should pass all the gpmc timing information from DT. And then the
driver also still needs to register it's retime function with gpmc.

> > 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.
> 
> I believe you are referring to tusb6010_platform_retime(), other than during
> initial setup, i.e. in tusb6010_setup_interface(), it is not invoked.
> tusb6010_platform_retime() is an exported symbol, unless I am missing
> something it is not invoked other than during initial setup. Did find this
> function in tusb6010.c, it is commented out, may be this was present earlier ?

Hmm yes looks like it's commented out.. But in theory the retime function
should be called between idle clock and runtime clock. And also for DFS,
so it's something we should be considered for proper gpmc support.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration
Date: Wed, 4 Jul 2012 00:51:59 -0700	[thread overview]
Message-ID: <20120704075158.GQ1122@atomide.com> (raw)
In-Reply-To: <C8443D0743D26F4388EA172BF4E2A7A93E9A2BAC@DBDE01.ent.ti.com>

* Mohammed, Afzal <afzal@ti.com> [120704 00:05]:
> Hi Tony,
> 
> On Tue, Jul 03, 2012 at 13:47:47, Tony Lindgren wrote:
> > * Jon Hunter <jon-hunter@ti.com> [120702 10:30]:
> 
> > > 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.
> 
> Sorry, not sure whether I follow you properly, based on what has been
> understood, will try to rephrase,
> 
> All the present gpmc timing calculation done in arch/arm/mach-omap2/gpmc-*
> to be moved to gpmc driver. And all the peripheral drivers using gpmc, i.e
> like smsc911x, tusb6010 needs to register their retime function with gpmc
> driver. And gpmc driver will invoke these registered retime function, when
> clock frequency changes.
> 
> But wouldn't it need changes in the existing drivers like smsc911x that are
> used by multiple architectures with gpmc specific registration (put under
> a macro ?). We will be having gpmc driver code that contains knowledge
> about peripheral timing calculation, seems there is no way out of this.
> Peripheral agnostic gpmc code may not happen it seems

It depends. For some drivers scaling both gpmc clock and the device clock
can happen, like with tusb6010 for example. But the smsc911x does not know
about the clocks.. So to additional changes to the driver would be required
to if device clocks need scaling. But for now, we should be able to do it
at gpmc level with the retime function, or just disable DFS for those clocks
if not supported.

The ideal solution in the long run would be to have gpmc scaling frequency
as the bus and device scaling frequency using cpufreq/devicefreq whatever
notifiers.
 
> In that case gpmc driver probe would have to be relieved of the task of
> setting up gpmc timings as we have to wait till peripheral drivers
> register their callback, right ?, seems in that case no timing information
> needs (or can be) to be passed from DT

Well we should pass all the gpmc timing information from DT. And then the
driver also still needs to register it's retime function with gpmc.

> > 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.
> 
> I believe you are referring to tusb6010_platform_retime(), other than during
> initial setup, i.e. in tusb6010_setup_interface(), it is not invoked.
> tusb6010_platform_retime() is an exported symbol, unless I am missing
> something it is not invoked other than during initial setup. Did find this
> function in tusb6010.c, it is commented out, may be this was present earlier ?

Hmm yes looks like it's commented out.. But in theory the retime function
should be called between idle clock and runtime clock. And also for DFS,
so it's something we should be considered for proper gpmc support.

Regards,

Tony

  reply	other threads:[~2012-07-04  7:52 UTC|newest]

Thread overview: 92+ 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 ` Afzal Mohammed
2012-06-27  6:33 ` [PATCH v5 1/3] ARM: OMAP2+: nand: unify init functions Afzal Mohammed
2012-06-27  6:33   ` Afzal Mohammed
2012-06-27  6:33 ` [PATCH v5 2/3] ARM: OMAP2+: gpmc: handle additional timings Afzal Mohammed
2012-06-27  6:33   ` Afzal Mohammed
2012-06-27  6:34 ` [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration Afzal Mohammed
2012-06-27  6:34   ` Afzal Mohammed
2012-06-27 14:58   ` Tony Lindgren
2012-06-27 14:58     ` Tony Lindgren
2012-06-28  9:32     ` Mohammed, Afzal
2012-06-28  9:32       ` Mohammed, Afzal
2012-06-28 12:32       ` Tony Lindgren
2012-06-28 12:32         ` Tony Lindgren
2012-06-28 12:33         ` Mohammed, Afzal
2012-06-28 12:33           ` Mohammed, Afzal
2012-06-28 12:44         ` Mohammed, Afzal
2012-06-28 12:44           ` Mohammed, Afzal
2012-07-30  7:36           ` Mohammed, Afzal
2012-07-30  7:36             ` Mohammed, Afzal
2012-06-28 16:43         ` Jon Hunter
2012-06-28 16:43           ` Jon Hunter
2012-06-28 19:00           ` Jon Hunter
2012-06-28 19:00             ` Jon Hunter
2012-07-02  6:26             ` Tony Lindgren
2012-07-02  6:26               ` Tony Lindgren
2012-06-29  6:15           ` Mohammed, Afzal
2012-06-29  6:15             ` Mohammed, Afzal
2012-06-29  6:38             ` Mohammed, Afzal
2012-06-29  6:38               ` Mohammed, Afzal
2012-06-29 14:15             ` Jon Hunter
2012-06-29 14:15               ` Jon Hunter
2012-07-02 10:04               ` Mohammed, Afzal
2012-07-02 10:04                 ` Mohammed, Afzal
2012-07-02  6:36           ` Tony Lindgren
2012-07-02  6:36             ` Tony Lindgren
2012-07-02  9:43             ` Mohammed, Afzal
2012-07-02  9:43               ` Mohammed, Afzal
2012-07-02 17:29               ` Jon Hunter
2012-07-02 17:29                 ` Jon Hunter
2012-07-03  4:35                 ` Mohammed, Afzal
2012-07-03  4:35                   ` Mohammed, Afzal
2012-07-03 15:10                   ` Jon Hunter
2012-07-03 15:10                     ` Jon Hunter
2012-07-04  5:36                     ` Mohammed, Afzal
2012-07-04  5:36                       ` Mohammed, Afzal
2012-07-02 17:25             ` Jon Hunter
2012-07-02 17:25               ` Jon Hunter
2012-07-03  8:17               ` Tony Lindgren
2012-07-03  8:17                 ` Tony Lindgren
2012-07-03 15:12                 ` Jon Hunter
2012-07-03 15:12                   ` Jon Hunter
2012-07-04  7:00                 ` Mohammed, Afzal
2012-07-04  7:00                   ` Mohammed, Afzal
2012-07-04  7:51                   ` Tony Lindgren [this message]
2012-07-04  7:51                     ` Tony Lindgren
2012-07-05 10:24                     ` Mohammed, Afzal
2012-07-05 10:24                       ` Mohammed, Afzal
2012-07-05 10:55                       ` Tony Lindgren
2012-07-05 10:55                         ` Tony Lindgren
2012-07-05 11:58                         ` Mohammed, Afzal
2012-07-05 11:58                           ` Mohammed, Afzal
2012-07-05 14:49                           ` Tony Lindgren
2012-07-05 14:49                             ` Tony Lindgren
2012-07-05 14:51                         ` Mohammed, Afzal
2012-07-05 14:51                           ` Mohammed, Afzal
2012-07-06 12:05                           ` Tony Lindgren
2012-07-06 12:05                             ` Tony Lindgren
2012-07-10  6:20                             ` Mohammed, Afzal
2012-07-10  6:20                               ` Mohammed, Afzal
2012-07-10  9:45                               ` Tony Lindgren
2012-07-10  9:45                                 ` Tony Lindgren
2012-07-10 10:04                                 ` Mohammed, Afzal
2012-07-10 10:04                                   ` Mohammed, Afzal
2012-07-10 13:17                                   ` Tony Lindgren
2012-07-10 13:17                                     ` Tony Lindgren
2012-07-10 13:47                                     ` Mohammed, Afzal
2012-07-10 13:47                                       ` Mohammed, Afzal
2012-07-10 17:15                                       ` Jon Hunter
2012-07-10 17:15                                         ` Jon Hunter
2012-07-11  6:47                                         ` Tony Lindgren
2012-07-11  6:47                                           ` Tony Lindgren
2012-07-13  4:36                                           ` Mohammed, Afzal
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-06 13:38                                             ` Mohammed, Afzal
2012-08-17 15:02                                             ` Jon Hunter
2012-08-17 15:02                                               ` Jon Hunter
2012-08-21 11:14                                               ` Mohammed, Afzal
2012-08-21 11:14                                                 ` Mohammed, Afzal
2012-06-27 10:08 ` [PATCH v5 0/3] Prepare for GPMC driver conversion Mohammed, Afzal
2012-06-27 10:08   ` 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=20120704075158.GQ1122@atomide.com \
    --to=tony@atomide.com \
    --cc=afzal@ti.com \
    --cc=jon-hunter@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.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.