public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: johnstul@us.ibm.com
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] Unify interface to persistent CMOS/RTC/whatever clock
Date: Wed, 16 Aug 2006 22:47:41 -0700	[thread overview]
Message-ID: <200608162247.41632.david-b@pacbell.net> (raw)

>         Almost every arch has some form of persistent clock (CMOS, RTC, etc)
> which is normally used at boot time to initialize xtime and
> wall_to_monotonic. As part of the timekeeping consolidation, I propose
> the following generic interface to the arch specific persistent clock:

Hmm, this seems to ignore the RTC framework rather entirely, which
seems to me like the wrong implementation approach.  You'd likely have
noticed that if you had supported a few ARM boards.  :)

Here's a fairly common scenario for an embedded system:  the battery
backed clock is accessed through I2C or SPI, rather than an ISA style
direct register access, so it's not accessible until after those driver
stacks have initialized.

Or similarly, the SOC family may have a powerful RTC ("arch specific")
with alarm and system wakeup capabilities, but it may not be the system's
battery backed clock ... so that RTC would be initialized from another one,
which is accessed using I2C/SPI/etc.  (RTCs integrated on SOCs evidently
have a hard time being as power-miserly as the discrete ones.)

The approach in this patch doesn't seem to play well with those scenarios,
because it expects to do timekeeping setup long before the system's RTC is
necessarily going to be available ... and doesn't have an answer for those
cases where the RTC is unavailable before e.g. late_initcall().

I'd be more interested in something that improves on CONFIG_RTC_HCTOSYS,
and for example addresses the need to update the system wall time from
such RTCs after resume, not just at boot time.

- Dave


             reply	other threads:[~2006-08-17  5:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-17  5:47 David Brownell [this message]
2006-08-17 19:08 ` [RFC][PATCH] Unify interface to persistent CMOS/RTC/whatever clock john stultz
2006-08-17 20:28   ` David Brownell
2006-08-17 21:42     ` john stultz
2006-08-17 23:41       ` David Brownell
2006-08-18  0:07         ` john stultz
2006-08-18  1:38           ` David Brownell
2006-08-18 23:36             ` john stultz
2006-08-19 16:39               ` David Brownell
2006-08-19 16:44                 ` David Brownell
2006-08-18  5:50           ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2006-08-16 22:45 john stultz
2006-08-17  1:49 ` john stultz
2006-08-17  9:20 ` Martin Schwidefsky

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=200608162247.41632.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox