All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Kevin Hilman <khilman@ti.com>
Cc: "DebBarma, Tarun Kanti" <tarun.kanti@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Gopinath, Thara" <thara@ti.com>
Subject: Re: [PATCH v12 4/9] OMAP2+: dmtimer: convert to platform devices
Date: Mon, 14 Mar 2011 10:12:40 -0700	[thread overview]
Message-ID: <20110314171240.GB7258@atomide.com> (raw)
In-Reply-To: <87d3lx5hoo.fsf@ti.com>

* Kevin Hilman <khilman@ti.com> [110311 16:00]:
> Tony Lindgren <tony@atomide.com> writes:
> 
> > * DebBarma, Tarun Kanti <tarun.kanti@ti.com> [110310 20:18]:
> >> > From: Hilman, Kevin
> >> > 
> >> > I guess Tony has the final say here, but personally, I don't really like
> >> > the special treatment of a system timer, unless it is an init-time only
> >> > special treatment.  Since we now have dynamically configurable
> >> > clocksources, the concept of a system timer doesn't really exist (except
> >> > for in early boot.)  At any time during runtime, we could dynamically
> >> > switch the clocksource to a different timer device.  At this point, one
> >> > would expect runtime PM for the previous timer to kick in and idle the
> >> > timer.  That cannot happen with this approach.
> >>
> >> I am open to suggestions.
> >
> > There's no need to dynamically change the clocksource. We can to set up
> > things so we have a system timer running with minimal code and faster
> > clock rate. Then we can use a separate timer with the 32KiHZ source
> > just to provide wake-up events for idle modes. And this second wake-up
> > timer can be just a regular device driver.
> >
> > The system timer code needs to be fast. And I don't want to add any
> > dependencies to anything except clock framework. Like I've said, the
> > rest of the timers can be just a regular device driver.
> 
> There are a couple problems with this approach.  The special case
> handling of a "system" timer leads to duplicate code (this series is a
> good example.)

I think the related inline functions can be shared.
 
> The other problem is PM.
> 
> If we switch away from the original system timer (for whatever reason),
> since it is not a regular device, it will not have runtime PM We'll then
> need special case PM code for the system timer, which I think is wasted
> effort.

This should not cause problems either, there should not be any need to
switch the timers in the setup what I'm thinking.

In the long run, think "local timer" for runtime, and then "wakeup timer"
that gets only programmed when we enter idle. The "local timer" will
continue operating normally after we wake-up and the "wakeup timer"
will be just one shot event. Of course in the omap[23] case the
"local timer" is really a faster dmtimer, but in the omap4+ case there's
are real local timers.

> If this can be done such that the system timer is eventually a regular
> device driver, then that should be fine. 

In this setup there should not be need to mess with the system timer
after boot as we don't need to switch clock sources.

Regards,

Tony

  reply	other threads:[~2011-03-14 17:12 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08 23:45 [PATCH v12 0/9] dmtimer adaptation to platform_driver Tarun Kanti DebBarma
2011-03-08 23:45 ` [PATCH v12 1/9] OMAP2+: dmtimer: add device names to flck nodes Tarun Kanti DebBarma
2011-03-08 23:45 ` [PATCH v12 2/9] OMAP4: hwmod data: add dmtimer version information Tarun Kanti DebBarma
2011-03-08 23:45 ` [PATCH v12 3/9] OMAP1: dmtimer: conversion to platform devices Tarun Kanti DebBarma
2011-03-08 23:45 ` [PATCH v12 4/9] OMAP2+: dmtimer: convert " Tarun Kanti DebBarma
2011-03-09 21:42   ` Tony Lindgren
2011-03-10 15:29     ` DebBarma, Tarun Kanti
2011-03-10 22:52   ` Kevin Hilman
2011-03-11  4:36     ` DebBarma, Tarun Kanti
2011-03-10 23:14   ` Kevin Hilman
2011-03-11  4:20     ` DebBarma, Tarun Kanti
2011-03-11 19:13       ` Tony Lindgren
2011-03-12  0:03         ` Kevin Hilman
2011-03-14 17:12           ` Tony Lindgren [this message]
2011-03-17 22:00             ` Kevin Hilman
2011-03-19  0:27               ` Tony Lindgren
2011-03-19  4:34                 ` Santosh Shilimkar
2011-03-21 17:07                   ` Tony Lindgren
2011-03-21 18:33                     ` Kevin Hilman
2011-03-21 19:11                       ` Tony Lindgren
2011-03-25  6:55                         ` DebBarma, Tarun Kanti
2011-03-25 15:55                           ` Tony Lindgren
2011-03-29 17:13                             ` Tony Lindgren
2011-03-29 17:52                               ` Tony Lindgren
2011-03-10 23:21   ` Kevin Hilman
2011-03-11  4:13     ` DebBarma, Tarun Kanti
2011-03-08 23:45 ` [PATCH v12 5/9] OMAP: dmtimer: platform driver Tarun Kanti DebBarma
2011-03-08 23:45 ` [PATCH v12 6/9] dmtimer: switch-over to platform device driver Tarun Kanti DebBarma
2011-03-09 22:02   ` Tony Lindgren
2011-03-10 15:27     ` DebBarma, Tarun Kanti
2011-03-10 17:56       ` Tony Lindgren
2011-03-11  5:35         ` DebBarma, Tarun Kanti
2011-03-11 12:45           ` G, Manjunath Kondaiah
2011-03-11 19:15             ` Tony Lindgren
2011-03-12  4:20               ` G, Manjunath Kondaiah
2011-03-11 19:14           ` Tony Lindgren
2011-03-14  6:48             ` DebBarma, Tarun Kanti
2011-03-08 23:45 ` [PATCH v12 7/9] OMAP: dmtimer: pm_runtime support Tarun Kanti DebBarma
2011-03-08 23:45 ` [PATCH v12 8/9] OMAP: dmtimer: add timeout to low-level routines Tarun Kanti DebBarma
2011-03-08 23:45 ` [PATCH v12 9/9] OMAP: dmtimer: use mutex instead of spinlock Tarun Kanti DebBarma

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=20110314171240.GB7258@atomide.com \
    --to=tony@atomide.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tarun.kanti@ti.com \
    --cc=thara@ti.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.