public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Lance Tagliapietra <lancetag@Luminet.net>
To: Geert Uytterhoeven <geert.uytterhoeven@gmail.com>
Cc: linux-m68k@vger.kernel.org
Subject: Re: m68k 2.6.26-1 vs 2.4.30 comparison
Date: Thu, 14 May 2009 21:37:45 -0500	[thread overview]
Message-ID: <20090515023743.GA1647@luminet.net> (raw)
In-Reply-To: <10f740e80905030408p38f87e09ueabc45ef98d4a88f@mail.gmail.com>

On Sun, May 03, 2009 at 01:08:06PM +0200, Geert Uytterhoeven wrote:
> > d). The real time clock came up on the worng month, going from 2.4.30 to 2.6.26 (or 28),
> > March vs April, in this case.
> 
> That's an interesting one...
> 
> In 2.4.30, you have both a2000_gettod() (for boot time setting), which does:
> 
>     *monp  = tod_2000.month1      * 10 + tod_2000.month2;
> 
> and amiga_hwclk() (for /dev/rtc), which does:
> 
>     t->tm_mon  = tod_2000.month1      * 10 + tod_2000.month2 - 1;
> 
> In 2.6.29, you only have a2000_hwclk(), which does
> 
>     t->tm_mon  = tod_2000.month1      * 10 + tod_2000.month2 - 1;
> 
> The data returned by a2000_gettod() is converted to seconds using mktime(),
> which assumes months are in the range 1..12.
> 
> amiga_hwclk() and a2000_hwclk() both use struct rtc_time. This should
> be similar to
> struct tm in <time.h>, where the months are in the range 0..11.
> Both rtc_proc_output()/gen_rtc_proc_output() (2.4.30) and
> rtc_proc_show() (2.6.29) do
> print tm.tm_mon + 1 to make them be in the range 1..12.
> 
> So at first sight, I don't see where the bug is...
> 
> What does `hwlock -ur` say, on both 2.4.30 and 2.6.29?

I'm afraid the result isn't going to be helpful just yet (assuming you meant hwclock, not hwlock):

hwclock -ur
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.

hwclock --debug
hwclock: Open of /dev/rtc failed, errno=19: No such device.
Cannot access the Hardware Clock via any known method.
hwclock from util-linux-2.12r
No usable clock interface found.

Now, there is a /dev/rtc device of type 10 135.  Interestingly, though is that the 
kernel is looking for an "rtc0" device based on the kernel config.  So I'll make
that change to the kernel config and re-build and see what I get -- or would it 
be a better approach to add a /dev/rtc0 c 10 135?

Thanks,

--Lance

  reply	other threads:[~2009-05-15  2:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03  7:28 m68k 2.6.26-1 vs 2.4.30 comparison Lance Tagliapietra
2009-05-03 11:08 ` Geert Uytterhoeven
2009-05-15  2:37   ` Lance Tagliapietra [this message]
2009-05-15  9:31     ` Andreas Schwab
2009-05-15  9:57       ` Geert Uytterhoeven
2009-05-15 17:02       ` Amiga RTC kernel config [was: Re: m68k 2.6.26-1 vs 2.4.30 comparison] Lance Tagliapietra
2009-05-15 20:05         ` Lance Tagliapietra
2009-05-06  6:44 ` m68k 2.6.26-1 vs 2.4.30 comparison Kolbjørn Barmen
2009-05-06 17:45   ` Lance Tagliapietra
2009-05-07  2:37     ` Michael Schmitz

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=20090515023743.GA1647@luminet.net \
    --to=lancetag@luminet.net \
    --cc=geert.uytterhoeven@gmail.com \
    --cc=linux-m68k@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