RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-22 Thread Mohammed, Afzal
Hi Tony, Jon, On Thu, Jun 21, 2012 at 05:05:56, Hunter, Jon wrote: > On 06/20/2012 10:12 AM, Tony Lindgren wrote: > > * Mohammed, Afzal [120620 07:57]: > Therefore, I am wondering if Afzal's driver needs to register the gpmc > devices outside of the gpmc_probe() and add the devices as children.

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-20 Thread Jon Hunter
On 06/20/2012 10:12 AM, Tony Lindgren wrote: > * Mohammed, Afzal [120620 07:57]: >> Hi Tony, >> >> On Wed, Jun 20, 2012 at 18:58:49, Tony Lindgren wrote: >>> * Mohammed, Afzal [120616 02:19]: On Fri, Jun 15, 2012 at 18:15:20, Tony Lindgren wrote: >> By gpmc registration, if you meant r

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-20 Thread Tony Lindgren
* Mohammed, Afzal [120620 07:57]: > Hi Tony, > > On Wed, Jun 20, 2012 at 18:58:49, Tony Lindgren wrote: > > * Mohammed, Afzal [120616 02:19]: > > > On Fri, Jun 15, 2012 at 18:15:20, Tony Lindgren wrote: > > > > By gpmc registration, if you meant registering platform device for > > > gpmc periph

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-20 Thread Mohammed, Afzal
Hi Tony, On Wed, Jun 20, 2012 at 18:58:49, Tony Lindgren wrote: > * Mohammed, Afzal [120616 02:19]: > > On Fri, Jun 15, 2012 at 18:15:20, Tony Lindgren wrote: > > By gpmc registration, if you meant registering platform device for > > gpmc peripherals, for a board that uses the new gpmc driver in

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-20 Thread Tony Lindgren
* Mohammed, Afzal [120616 02:19]: > Hi Tony, > > On Fri, Jun 15, 2012 at 18:15:20, Tony Lindgren wrote: > > * Mohammed, Afzal [120615 03:26]: > > > > Here clock is required even before driver is probed, i.e for platform to > > > calculate timings, that has to be passed through platform data. >

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-16 Thread Mohammed, Afzal
Hi Tony, On Fri, Jun 15, 2012 at 18:15:20, Tony Lindgren wrote: > * Mohammed, Afzal [120615 03:26]: > > Here clock is required even before driver is probed, i.e for platform to > > calculate timings, that has to be passed through platform data. > > Eventually we should be able to move the gpmc

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-15 Thread Jon Hunter
Hi Paul, On 06/14/2012 07:20 PM, Paul Walmsley wrote: > On Thu, 14 Jun 2012, Jon Hunter wrote: > >> What does make this a bit more difficult is the function >> gpmc_round_ns_to_ticks(). It appears to convert nanoseconds to ticks and >> back to nanoseconds. I am guessing to account for some roundi

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-15 Thread Tony Lindgren
* Mohammed, Afzal [120615 03:26]: > Hi Jon, > > On Fri, Jun 15, 2012 at 00:28:44, Hunter, Jon wrote: > > On 06/14/2012 08:32 AM, Mohammed, Afzal wrote: > > > On Thu, Jun 14, 2012 at 18:52:55, Hunter, Jon wrote: > > > >> Why? You currently have a global variable storing the clock handle. It > > >

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-15 Thread Mohammed, Afzal
Hi Jon, On Fri, Jun 15, 2012 at 02:21:50, Hunter, Jon wrote: > On 06/14/2012 01:17 AM, Mohammed, Afzal wrote: > > gpmc_cs_set_timings() does currently convert time to clock cycles required, > > and this gpmc driver have the capability to do it. > > > > What I was saying is a different issue, inp

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-15 Thread Mohammed, Afzal
Hi Jon, On Fri, Jun 15, 2012 at 00:28:44, Hunter, Jon wrote: > On 06/14/2012 08:32 AM, Mohammed, Afzal wrote: > > On Thu, Jun 14, 2012 at 18:52:55, Hunter, Jon wrote: > >> Why? You currently have a global variable storing the clock handle. It > >> can be quite common for drivers to know the clock

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-14 Thread Paul Walmsley
On Thu, 14 Jun 2012, Jon Hunter wrote: > What does make this a bit more difficult is the function > gpmc_round_ns_to_ticks(). It appears to convert nanoseconds to ticks and > back to nanoseconds. I am guessing to account for some rounding error. I > am curious what impact this function is having o

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-14 Thread Jon Hunter
Hi Afzal, On 06/14/2012 01:17 AM, Mohammed, Afzal wrote: > Hi Jon, > > On Wed, Jun 13, 2012 at 20:21:50, Hunter, Jon wrote: > >>> I do not think it is practically possible. Please see timing calculations >>> in arch/arm/mach-omap2/gpmc-*, the way it is done for different >>> peripherals are diff

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-14 Thread Jon Hunter
On 06/14/2012 08:32 AM, Mohammed, Afzal wrote: > Hi Jon, > > On Thu, Jun 14, 2012 at 18:52:55, Hunter, Jon wrote: >> On 06/14/2012 02:03 AM, Mohammed, Afzal wrote: >>> On Wed, Jun 13, 2012 at 20:21:50, Hunter, Jon wrote: > If the clk handle for the gpmc is passed to the gpmc driver, then th

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-14 Thread Mohammed, Afzal
Hi Jon, On Thu, Jun 14, 2012 at 18:52:55, Hunter, Jon wrote: > On 06/14/2012 02:03 AM, Mohammed, Afzal wrote: > > On Wed, Jun 13, 2012 at 20:21:50, Hunter, Jon wrote: > >> If the clk handle for the gpmc is passed to the gpmc driver, then there > >> is no reason why the driver cannot do this. > >

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-14 Thread Jon Hunter
On 06/14/2012 02:03 AM, Mohammed, Afzal wrote: > Hi Jon, > > On Wed, Jun 13, 2012 at 20:21:50, Hunter, Jon wrote: > >> If the clk handle for the gpmc is passed to the gpmc driver, then there >> is no reason why the driver cannot do this. > > I believe passing clk details through platform data

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-14 Thread Mohammed, Afzal
Hi Jon, On Wed, Jun 13, 2012 at 20:38:09, Hunter, Jon wrote: > On 06/13/2012 08:05 AM, Mohammed, Afzal wrote: > > Do you mean that gpmc driver should have the capability to calculate > > peripheral > > timings at runtime based on frequency ?, I am not sure how this can be > > handled > > by gpm

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-14 Thread Mohammed, Afzal
Hi Jon, On Wed, Jun 13, 2012 at 20:21:50, Hunter, Jon wrote: > If the clk handle for the gpmc is passed to the gpmc driver, then there > is no reason why the driver cannot do this. I believe passing clk details through platform data is an abuse of clock framework. Regards Afzal -- To unsubscri

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Mohammed, Afzal
Hi Jon, On Thu, Jun 14, 2012 at 11:47:03, Mohammed, Afzal wrote: > gpmc_cs_set_timings() does currently convert time to clock cycles required, > and this gpmc driver have the capability to do it. > > What I was saying is a different issue, input to gpmc_cs_set_timings, which > is time sometimes

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Mohammed, Afzal
Hi Jon, On Wed, Jun 13, 2012 at 20:21:50, Hunter, Jon wrote: > > I do not think it is practically possible. Please see timing calculations > > in arch/arm/mach-omap2/gpmc-*, the way it is done for different > > peripherals are different, and we cannot expect gpmc driver to do those as > > that wo

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Jon Hunter
Hi Afzal, On 06/13/2012 08:05 AM, Mohammed, Afzal wrote: > Hi Tony, > > On Wed, Jun 13, 2012 at 17:32:09, Tony Lindgren wrote: >> * Mohammed, Afzal [120612 22:24]: >>> Hi Jon, >>> >>> On Tue, Jun 12, 2012 at 23:10:01, Hunter, Jon wrote: > Right but potentially, this could be done by the dr

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Jon Hunter
Hi Afzal, On 06/13/2012 12:20 AM, Mohammed, Afzal wrote: > Hi Jon, > > On Tue, Jun 12, 2012 at 23:10:01, Hunter, Jon wrote: >> On 06/12/2012 01:53 AM, Mohammed, Afzal wrote: >>> On Tue, Jun 12, 2012 at 01:26:29, Hunter, Jon wrote: > My preference would be to store gpmc_l3_clk in the pdata a

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Mohammed, Afzal
Hi Tony, On Wed, Jun 13, 2012 at 19:09:38, Tony Lindgren wrote: > * Mohammed, Afzal [120613 06:10]: > > On Wed, Jun 13, 2012 at 17:32:09, Tony Lindgren wrote: > > Do you mean that gpmc driver should have the capability to calculate > > peripheral > > timings at runtime based on frequency ?, I a

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Tony Lindgren
* Mohammed, Afzal [120613 06:10]: > Hi Tony, > > On Wed, Jun 13, 2012 at 17:32:09, Tony Lindgren wrote: > > * Mohammed, Afzal [120612 22:24]: > > > Hi Jon, > > > > > > On Tue, Jun 12, 2012 at 23:10:01, Hunter, Jon wrote: > > > > > Right but potentially, this could be done by the driver. > > >

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Mohammed, Afzal
Hi Tony, On Wed, Jun 13, 2012 at 17:32:09, Tony Lindgren wrote: > * Mohammed, Afzal [120612 22:24]: > > Hi Jon, > > > > On Tue, Jun 12, 2012 at 23:10:01, Hunter, Jon wrote: > > > Right but potentially, this could be done by the driver. > > > > I do not think it is practically possible. Please

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-13 Thread Tony Lindgren
* Mohammed, Afzal [120612 22:24]: > Hi Jon, > > On Tue, Jun 12, 2012 at 23:10:01, Hunter, Jon wrote: > > On 06/12/2012 01:53 AM, Mohammed, Afzal wrote: > > > On Tue, Jun 12, 2012 at 01:26:29, Hunter, Jon wrote: > > > >> My preference would be to store gpmc_l3_clk in the pdata and pass to > > >>

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-12 Thread Mohammed, Afzal
Hi Jon, On Tue, Jun 12, 2012 at 23:10:01, Hunter, Jon wrote: > On 06/12/2012 01:53 AM, Mohammed, Afzal wrote: > > On Tue, Jun 12, 2012 at 01:26:29, Hunter, Jon wrote: > >> My preference would be to store gpmc_l3_clk in the pdata and pass to > >> probe via the pdata. The aim would be to remove the

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-12 Thread Jon Hunter
On 06/12/2012 01:53 AM, Mohammed, Afzal wrote: > Hi Jon, > > On Tue, Jun 12, 2012 at 01:26:29, Hunter, Jon wrote: > >>> + pdev = omap_device_build(name, -1, oh, pdata, >>> + sizeof(*pdata), NULL, 0, 0); >>> + if (IS_ERR(pdev)) { >>> + WARN(1, "Can'

RE: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-11 Thread Mohammed, Afzal
Hi Jon, On Tue, Jun 12, 2012 at 01:26:29, Hunter, Jon wrote: > > + pdev = omap_device_build(name, -1, oh, pdata, > > + sizeof(*pdata), NULL, 0, 0); > > + if (IS_ERR(pdev)) { > > + WARN(1, "Can't build omap_device for %s:%s.\n", > > +

Re: [PATCH v5 02/14] ARM: OMAP2+: gpmc: Adapt to HWMOD

2012-06-11 Thread Jon Hunter
Hi Afzal, On 06/11/2012 09:26 AM, Afzal Mohammed wrote: > Create API for platforms to adapt gpmc to HWMOD > > Signed-off-by: Afzal Mohammed > --- > arch/arm/mach-omap2/gpmc.c | 31 +++ > arch/arm/plat-omap/include/plat/gpmc.h |2 ++ > 2 files change