From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Cc: "Laurent Vivier" <laurent@lvivier.info>,
"Kolbjørn Barmen" <linux-m68k@kolla.no>,
"Finn Thain" <fthain@telegraphics.com.au>,
Riccardo <riccardo@kaffe.org>, "Brad Boyer" <flar@allandria.com>,
Linux/m68k <linux-m68k@vger.kernel.org>
Subject: Re: [PATCH] reinstate mac rtc
Date: Thu, 23 Oct 2008 09:28:56 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0810230910460.7533@anakin> (raw)
In-Reply-To: <alpine.DEB.1.00.0810230538410.22587@zirkon.biophys.uni-duesseldorf.de>
On Thu, 23 Oct 2008, Michael Schmitz wrote:
> > > > Good, so solving the problem should fix it for both. When did the
> > > > problem get
> > > > introduced - 2.4 or 2.6?
> > >
> > > Silly question I guess, but how is the passing done?
> >
> > On m68k architecture, bootloader passes a list of tags to the kernel, see
> > set_kernel_bootinfo():
>
> Short answer: bootinfo.
>
> I'm confident the date/time is passed by bootinfo OK, but it then
> 'disappears'.
Yep, nothing is done with mac_bi_data.boottime, except for printing it
to the kernel log.
> I'm pretty sure it was still OK in the 2.2 series - I'm unsure on when it
> broke: 2.4 or 2.6?
It seems to be removed in early 2.5 (2.4 has it, my oldest 2.5 is 2.5.5
and that one doesn't have it anymore):
--- a/arch/m68k/mac/misc.c
+++ b/arch/m68k/mac/misc.c
@@ -571,6 +571,26 @@ static void unmktime(unsigned long time, long offset,
return;
}
+/*
+ * Return the boot time for use in initializing the kernel clock.
+ *
+ * I'd like to read the hardware clock here but many machines read
+ * the PRAM through ADB, and interrupts aren't initialized when this
+ * is called so ADB obviously won't work.
+ */
+
+void mac_gettod(int *yearp, int *monp, int *dayp,
+ int *hourp, int *minp, int *secp)
+{
+ /* Yes the GMT bias is backwards. It looks like Penguin is
+ screwing up the boottime it gives us... This works for me
+ in Canada/Eastern but it might be wrong everywhere else. */
+ unmktime(mac_bi_data.boottime, -mac_bi_data.gmtbias * 60,
+ yearp, monp, dayp, hourp, minp, secp);
+ /* For some reason this is off by one */
+ *monp = *monp + 1;
+}
+
/*
* Read/write the hardware clock.
*/
and `mach_gettod' was wired up to 'mac_gettod'.
No idea why it was removed. I should check my mail archives (2002 and
older are on CD).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2008-10-23 7:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.64.0810061855300.28882@loopy.telegraphics.com.au>
2008-10-13 19:21 ` [PATCH] reinstate mac rtc Geert Uytterhoeven
2008-10-14 2:16 ` Finn Thain
2008-10-14 7:30 ` Geert Uytterhoeven
2008-10-15 21:41 ` Riccardo
2008-10-16 1:02 ` Finn Thain
2008-10-16 6:49 ` Brad Boyer
2008-10-18 11:12 ` Riccardo
2008-10-18 17:39 ` Kolbjørn Barmen
2008-10-19 2:53 ` Finn Thain
2008-10-19 16:37 ` Kolbjørn Barmen
2008-10-20 2:03 ` Finn Thain
2008-10-20 2:05 ` Michael Schmitz
2008-10-20 19:13 ` Laurent Vivier
2008-10-22 7:19 ` Michael Schmitz
2008-10-22 11:09 ` Kolbjørn Barmen
2008-10-22 22:14 ` Laurent Vivier
2008-10-23 3:56 ` Michael Schmitz
2008-10-23 7:28 ` Geert Uytterhoeven [this message]
2008-10-23 7:39 ` Geert Uytterhoeven
2008-10-24 2:49 ` Michael Schmitz
2008-10-25 4:24 ` Michael Schmitz
2008-10-25 5:10 ` Finn Thain
2008-10-25 7:08 ` Finn Thain
2008-10-26 3:04 ` Michael Schmitz
2008-10-26 3:24 ` Finn Thain
2008-10-19 11:52 ` Finn Thain
2008-10-18 16:17 ` Riccardo
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=Pine.LNX.4.64.0810230910460.7533@anakin \
--to=geert@linux-m68k.org \
--cc=flar@allandria.com \
--cc=fthain@telegraphics.com.au \
--cc=laurent@lvivier.info \
--cc=linux-m68k@kolla.no \
--cc=linux-m68k@vger.kernel.org \
--cc=riccardo@kaffe.org \
--cc=schmitz@biophys.uni-duesseldorf.de \
/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