* [PATCH 0/2] ARM: omap: dmtimer: fix incorrect TCRR value in posted mode
@ 2012-05-11 13:53 Tarun Kanti DebBarma
2012-05-11 13:53 ` [PATCH 1/2] ARM: omap: hwmod: Add an 'ick' clkdev alias Tarun Kanti DebBarma
2012-05-11 13:53 ` [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck Tarun Kanti DebBarma
0 siblings, 2 replies; 8+ messages in thread
From: Tarun Kanti DebBarma @ 2012-05-11 13:53 UTC (permalink / raw)
To: linux-omap
Cc: paul, tony, santosh.shilimkar, khilman, b-cousson,
Tarun Kanti DebBarma
Timers in PER domain periodically report old time from TCRR in posted mode
unless ICLK >= 4 * FCLK. The problem is addressed in the following manner:
Patch 1: Adds ick alias in the clkdev table so that dmtimer code can
extract the iclk rate using clk_get_rate().
Patch 2: The final logic added in omap_dm_timer_prepare() where timer is
set to non-posted mode if iclk < 4*fclk.
Rajendra Nayak (1):
ARM: omap: hwmod: Add an 'ick' clkdev alias
Tarun Kanti DebBarma (1):
ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck
arch/arm/plat-omap/dmtimer.c | 12 ++++++++++++
arch/arm/plat-omap/omap_device.c | 3 +++
2 files changed, 15 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ARM: omap: hwmod: Add an 'ick' clkdev alias
2012-05-11 13:53 [PATCH 0/2] ARM: omap: dmtimer: fix incorrect TCRR value in posted mode Tarun Kanti DebBarma
@ 2012-05-11 13:53 ` Tarun Kanti DebBarma
2012-05-11 13:53 ` [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck Tarun Kanti DebBarma
1 sibling, 0 replies; 8+ messages in thread
From: Tarun Kanti DebBarma @ 2012-05-11 13:53 UTC (permalink / raw)
To: linux-omap
Cc: paul, tony, santosh.shilimkar, khilman, b-cousson, Rajendra Nayak
From: Rajendra Nayak <rnayak@ti.com>
For all hwmods' with just one slave interface, use the
slave->clk to add an 'ick' clkdev alias in the table.
This is useful for drivers of such devices to get
the interface clock using 'clk_get(dev, "ick")'
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
arch/arm/plat-omap/omap_device.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index d50cbc6..c8bc005 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -311,6 +311,9 @@ static void _add_hwmod_clocks_clkdev(struct omap_device *od,
for (i = 0; i < oh->opt_clks_cnt; i++)
_add_clkdev(od, oh->opt_clks[i].role, oh->opt_clks[i].clk);
+
+ if (oh->slaves_cnt == 1)
+ _add_clkdev(od, "ick", oh->slaves[0]->clk);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck
2012-05-11 13:53 [PATCH 0/2] ARM: omap: dmtimer: fix incorrect TCRR value in posted mode Tarun Kanti DebBarma
2012-05-11 13:53 ` [PATCH 1/2] ARM: omap: hwmod: Add an 'ick' clkdev alias Tarun Kanti DebBarma
@ 2012-05-11 13:53 ` Tarun Kanti DebBarma
2012-05-29 21:21 ` Kevin Hilman
1 sibling, 1 reply; 8+ messages in thread
From: Tarun Kanti DebBarma @ 2012-05-11 13:53 UTC (permalink / raw)
To: linux-omap
Cc: paul, tony, santosh.shilimkar, khilman, b-cousson,
Tarun Kanti DebBarma
Timers in PER domain periodically report old time from TCRR in
posted mode if ick < 4*fck. Therefore, set timer to non-posted
whenever ick < 4*fck for all timers.
Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
arch/arm/plat-omap/dmtimer.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 15e7882..a81b85e 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -378,6 +378,7 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
{
int ret;
struct dmtimer_platform_data *pdata;
+ struct clk *iclk;
if (unlikely(!timer))
return -EINVAL;
@@ -388,6 +389,17 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
return -EINVAL;
ret = pdata->set_timer_src(timer->pdev, source);
+ /*
+ * Timers in PER domain periodically report old time
+ * from TCRR in posted mode if ick < 4*fck. Hence,
+ * when this condition is satisfied setting the timer
+ * to non-posted mode, instead.
+ */
+ if (!IS_ERR(&ret)) {
+ iclk = clk_get(&timer->pdev->dev, "ick");
+ if (clk_get_rate(iclk) < (4 * clk_get_rate(timer->fclk)))
+ timer->posted = 0;
+ }
return ret;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck
2012-05-11 13:53 ` [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck Tarun Kanti DebBarma
@ 2012-05-29 21:21 ` Kevin Hilman
2012-06-06 11:11 ` DebBarma, Tarun Kanti
0 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2012-05-29 21:21 UTC (permalink / raw)
To: Tarun Kanti DebBarma; +Cc: linux-omap, paul, tony, santosh.shilimkar, b-cousson
Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
> Timers in PER domain periodically report old time from TCRR in
> posted mode if ick < 4*fck. Therefore, set timer to non-posted
> whenever ick < 4*fck for all timers.
Is there an erratum assocaited with this?
Does this problem affect every SoC?
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck
2012-05-29 21:21 ` Kevin Hilman
@ 2012-06-06 11:11 ` DebBarma, Tarun Kanti
2012-06-20 13:13 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-06-06 11:11 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap, paul, tony, santosh.shilimkar, b-cousson
On Wed, May 30, 2012 at 2:51 AM, Kevin Hilman <khilman@ti.com> wrote:
> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>
>> Timers in PER domain periodically report old time from TCRR in
>> posted mode if ick < 4*fck. Therefore, set timer to non-posted
>> whenever ick < 4*fck for all timers.
>
> Is there an erratum assocaited with this?
Yes, but it has not yet got into the document. Right now what we have
is a hardware defect.
>
> Does this problem affect every SoC?
Not quite sure about OMAP2 but it affects OMAP3+.
--
Tarun
>
> Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck
2012-06-06 11:11 ` DebBarma, Tarun Kanti
@ 2012-06-20 13:13 ` Tony Lindgren
2012-06-20 13:17 ` Shilimkar, Santosh
0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2012-06-20 13:13 UTC (permalink / raw)
To: DebBarma, Tarun Kanti
Cc: Kevin Hilman, linux-omap, paul, santosh.shilimkar, b-cousson
* DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120606 04:15]:
> On Wed, May 30, 2012 at 2:51 AM, Kevin Hilman <khilman@ti.com> wrote:
> > Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
> >
> >> Timers in PER domain periodically report old time from TCRR in
> >> posted mode if ick < 4*fck. Therefore, set timer to non-posted
> >> whenever ick < 4*fck for all timers.
> >
> > Is there an erratum assocaited with this?
> Yes, but it has not yet got into the document. Right now what we have
> is a hardware defect.
> >
> > Does this problem affect every SoC?
> Not quite sure about OMAP2 but it affects OMAP3+.
This seems not too urgent and OK to queue into fixes-non-critical?
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck
2012-06-20 13:13 ` Tony Lindgren
@ 2012-06-20 13:17 ` Shilimkar, Santosh
2012-06-20 14:15 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: Shilimkar, Santosh @ 2012-06-20 13:17 UTC (permalink / raw)
To: Tony Lindgren
Cc: DebBarma, Tarun Kanti, Kevin Hilman, linux-omap, paul, b-cousson
Tony,
On Wed, Jun 20, 2012 at 6:43 PM, Tony Lindgren <tony@atomide.com> wrote:
>
> * DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120606 04:15]:
> > On Wed, May 30, 2012 at 2:51 AM, Kevin Hilman <khilman@ti.com> wrote:
> > > Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
> > >
> > >> Timers in PER domain periodically report old time from TCRR in
> > >> posted mode if ick < 4*fck. Therefore, set timer to non-posted
> > >> whenever ick < 4*fck for all timers.
> > >
> > > Is there an erratum assocaited with this?
> > Yes, but it has not yet got into the document. Right now what we have
> > is a hardware defect.
> > >
> > > Does this problem affect every SoC?
> > Not quite sure about OMAP2 but it affects OMAP3+.
>
> This seems not too urgent and OK to queue into fixes-non-critical?
>
Lets hold on this entire series. We are thinking of better WA especially to
avoid static dependencies. So just ignore this series all together for now.
Regards
Santosh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck
2012-06-20 13:17 ` Shilimkar, Santosh
@ 2012-06-20 14:15 ` Tony Lindgren
0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2012-06-20 14:15 UTC (permalink / raw)
To: Shilimkar, Santosh
Cc: DebBarma, Tarun Kanti, Kevin Hilman, linux-omap, paul, b-cousson
* Shilimkar, Santosh <santosh.shilimkar@ti.com> [120620 06:21]:
> Tony,
>
> On Wed, Jun 20, 2012 at 6:43 PM, Tony Lindgren <tony@atomide.com> wrote:
> >
> > * DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120606 04:15]:
> > > On Wed, May 30, 2012 at 2:51 AM, Kevin Hilman <khilman@ti.com> wrote:
> > > > Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
> > > >
> > > >> Timers in PER domain periodically report old time from TCRR in
> > > >> posted mode if ick < 4*fck. Therefore, set timer to non-posted
> > > >> whenever ick < 4*fck for all timers.
> > > >
> > > > Is there an erratum assocaited with this?
> > > Yes, but it has not yet got into the document. Right now what we have
> > > is a hardware defect.
> > > >
> > > > Does this problem affect every SoC?
> > > Not quite sure about OMAP2 but it affects OMAP3+.
> >
> > This seems not too urgent and OK to queue into fixes-non-critical?
> >
> Lets hold on this entire series. We are thinking of better WA especially to
> avoid static dependencies. So just ignore this series all together for now.
OK
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-06-20 14:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 13:53 [PATCH 0/2] ARM: omap: dmtimer: fix incorrect TCRR value in posted mode Tarun Kanti DebBarma
2012-05-11 13:53 ` [PATCH 1/2] ARM: omap: hwmod: Add an 'ick' clkdev alias Tarun Kanti DebBarma
2012-05-11 13:53 ` [PATCH 2/2] ARM: omap: dmtimer: set non-posted mode if iclk less than 4*fck Tarun Kanti DebBarma
2012-05-29 21:21 ` Kevin Hilman
2012-06-06 11:11 ` DebBarma, Tarun Kanti
2012-06-20 13:13 ` Tony Lindgren
2012-06-20 13:17 ` Shilimkar, Santosh
2012-06-20 14:15 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox