Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Cc: linux-mips@oss.sgi.com
Subject: Re: [RFC] generic MIPS RTC driver
Date: Mon, 12 Nov 2001 11:26:25 -0800	[thread overview]
Message-ID: <3BF02261.CD039BDA@mvista.com> (raw)
In-Reply-To: 20011112.104519.126571085.nemoto@toshiba-tops.co.jp

Atsushi Nemoto wrote:
> 
> >>>>> On Sat, 10 Nov 2001 23:17:46 -0800, Jun Sun <jsun@mvista.com> said:
> jsun> For many MIPS boards that start to use CONFIG_NEW_TIME_C, two
> jsun> rtc operations are implemented, rtc_get_time() and
> jsun> rtc_set_time().
> jsun> It is possible to write a simple generic RTC driver that is
> jsun> based on these two ops and can do simple RTC read&write ops.
> ...
> jsun> This is the idea behind the generic MIPS rtc driver.  See the
> jsun> patch below.
> ...
> jsun> Any comments?
> 
> Good idea.  I hope cvs kernel import this patch.
> 
> I found two small things to fix.  to_tm function sets 1..12 value in
> tm_mon field, so
> 
> 1. in rtc_ioctl (case RTC_RD_TIME), subtracting 1 from rtc_tm.tm_mon
>    is needed.
> 
> 2. in rtc_proc_output, adding 1 to tm.tm_mon is not needed.
> 

Good eye for spotting this. :-)

It turned out that tm_mon in rtc_time struct really should start from 0 to 11
(by definition).  So there is a bug in to_tm().  I sent a patch to Ralf and I
think he applied already.

Jun

      reply	other threads:[~2001-11-12 19:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-11  7:17 [RFC] generic MIPS RTC driver Jun Sun
2001-11-11 10:14 ` Geert Uytterhoeven
2001-11-12 12:59   ` Maciej W. Rozycki
2001-11-12 13:11     ` Geert Uytterhoeven
2001-11-12 13:29       ` Maciej W. Rozycki
2001-11-12 16:14         ` Pete Popov
2001-11-12 18:26           ` Jun Sun
2001-11-12 18:56             ` Jun Sun
2001-11-12 21:51               ` Tom Rini
2001-11-12 18:24         ` Jun Sun
2001-11-12 19:04           ` Maciej W. Rozycki
2001-11-12 19:21             ` Jun Sun
2001-11-12 18:19       ` Jun Sun
2001-11-12 18:55         ` Maciej W. Rozycki
2001-11-12 19:13           ` Jun Sun
2001-11-12 20:02         ` Geert Uytterhoeven
2001-11-12 20:54           ` Roman Zippel
2001-11-13  1:31             ` Tom Rini
2001-11-13  6:20               ` Geert Uytterhoeven
2001-11-13 14:44                 ` Tom Rini
2001-11-13 14:47                   ` Geert Uytterhoeven
2001-11-13 15:30                   ` Roman Zippel
2001-11-13 15:30                     ` Roman Zippel
2001-11-13 13:42             ` Richard Zidlicky
2001-11-13 15:32               ` Roman Zippel
2001-11-14  9:46                 ` Richard Zidlicky
2001-11-13 17:58               ` Jun Sun
2001-11-14 10:08                 ` Richard Zidlicky
2001-11-15 17:41                   ` Jun Sun
2001-11-12  1:45 ` Atsushi Nemoto
2001-11-12 19:26   ` 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=3BF02261.CD039BDA@mvista.com \
    --to=jsun@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=nemoto@toshiba-tops.co.jp \
    /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