Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux/MIPS Development <linux-mips@linux-mips.org>, jsun@mvista.com
Subject: Re: rtc_[gs]et_time()
Date: Tue, 15 Apr 2003 11:33:56 -0700	[thread overview]
Message-ID: <20030415113356.P1642@mvista.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0304151021320.26578-100000@vervain.sonytel.be>; from geert@linux-m68k.org on Tue, Apr 15, 2003 at 11:02:35AM +0200

On Tue, Apr 15, 2003 at 11:02:35AM +0200, Geert Uytterhoeven wrote:
> 	Hi,
> 
> Is there any specific reason why the function pointers rtc_[gs]et_time() use
> seconds instead of struct rtc_time? Most RTCs store the date and time in a
> format similar to struct rtc_time, so they have to convert from seconds to
> struct rtc_time again. I found only 2 exceptions, namely the vr4181 RTC and the
> Lasat ds1630 RTC (BTW, I found no RTC driver for vr41xx, since
> vr41xx_rtc_get_time() is nowhere defined).
>

This interface is designed to 1) satisfy rtc need by system timer (see
arch/mips/kernel/time.c) and 2) provide abstract for vastly different 
RTC hardwares.  Using "second" is a nature choice to interface with xtime

There are quite a few different RTCs.  And I am sure there are others coming.
vr4181_rtc_get_time() is another example (which you missed :0)

Extending this interface to support user rtc driver (/dev/rtc) is desirable.
Since rtc driver is not called frequently, converting twice is not much a concern.

BTW, I think the wrapping function done in PPC for genrtc should just work
for MIPS. :)

Once genrtc is done for MIPS, we should remove mips_rtc driver.

Jun

      parent reply	other threads:[~2003-04-15 18:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-15  9:02 rtc_[gs]et_time() Geert Uytterhoeven
2003-04-15  9:09 ` rtc_[gs]et_time() Brian Murphy
2003-04-15  9:12   ` rtc_[gs]et_time() Ladislav Michl
2003-04-15 12:52     ` rtc_[gs]et_time() Maciej W. Rozycki
2003-04-15 18:33 ` Jun Sun [this message]

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=20030415113356.P1642@mvista.com \
    --to=jsun@mvista.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-mips@linux-mips.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