From: Steven Hein <ssh@sgi.com>
To: Dan Malek <dan@mvista.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: 860 RTC support
Date: Thu, 19 Apr 2001 11:33:59 -0500 [thread overview]
Message-ID: <3ADF1377.72242D3B@sgi.com> (raw)
In-Reply-To: 3ADE0501.321052F9@mvista.com
Dan Malek wrote:
>
> > Is there a working method (to read the RTC value at boot-time)?
>
> The MPC8xx real-time clock is implicitly managed in the kernel.
> At boot time, the register is read and stored in the kernel
> time. Whenever the kernel time is updated, the hardware register
> is also updated. Since the 8xx is simply a 32-bit register
> access with an update rate that matches the kernel time, I
> chose to do it this way.
>
Dan,
My question was poorly worded (because at that point I
didn't understand the whole picture.....). I know that the
860's RTC on my board is working properly, that's not the issue.
My problem is this: when I set the date via the "date --set"
command (which calls stime()) or by calling settimeofday() directly,
it doesn't result in the 860's RTC being updated.
Yes, do_settimeofday() gets called properly, but it never results
in ppc_md.set_rtc_time ==> m8xx_set_rtc_time getting called!
(The only place I see that called is in timer_interrupt in
arch/ppc/kernel/time.c, and it's only called if the STA_UNSYNC
bit is not set in timer_status. do_settimeofday() results
in the STA_UNSYNC bit being set and I don't see how it gets
cleared.....).
I also looked at the other approach of configuring in /dev/rtc
and using hwclock, but the kernel won't boot with this
drivers/char/rtc.c
built in, and that doesn't look like it has 8xx support anyway.
In your response, you said "Whenever the kernel time is updated, the
hardware register is also updated.". Is settimeofday()/stime()
the methods of updating the kernel time that you were talking about?
I know I'm missing something, as it sounds like this works for others,
but I'd greatly appreciate it if someone would clue me in!
(Again, I'm using the 2.4.3 kernel, if that's relevant).
Thanks,
Steve
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-04-19 16:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-18 21:07 860 RTC support Steven Hein
2001-04-18 21:20 ` Dan Malek
2001-04-19 16:33 ` Steven Hein [this message]
2001-04-19 19:16 ` Dan Malek
2001-04-19 19:38 ` Dan Malek
2001-04-19 19:59 ` Steven Hein
2001-04-20 9:46 ` Gabriel Paubert
2001-04-19 19:40 ` Steven Hein
2001-04-20 3:27 ` Gabriel Paubert
2001-04-20 9:10 ` Gabriel Paubert
2001-04-19 19:44 ` Tom Rini
2001-04-19 19:54 ` Steven Hein
2001-04-19 20:06 ` Tom Rini
2001-04-19 20:22 ` Steven Hein
2001-04-19 22:40 ` Tom Rini
2001-04-20 2:20 ` Steve Hein
2001-04-19 20:08 ` Tom Rini
2001-04-20 15:51 ` Steven Hein
2001-04-20 15:55 ` Tom Rini
2001-04-19 20:01 ` Dan Malek
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=3ADF1377.72242D3B@sgi.com \
--to=ssh@sgi.com \
--cc=dan@mvista.com \
--cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).