From: Hollis Blanchard <hollis@austin.ibm.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: embedded list <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: Move 405LP RTC support from beech.c into ibm405lp.c
Date: 12 Dec 2002 10:17:44 -0600 [thread overview]
Message-ID: <1039709875.3537.20.camel@granite.austin.ibm.com> (raw)
In-Reply-To: <20021212035459.GF4631@zax.zax>
On Wed, 2002-12-11 at 21:54, David Gibson wrote:
>
> The RTC support (written by Todd Poynor) for the Beech is actually in
> the 405LP chip itself, not just on the Beech board.
<snip>
As a separate patch (either before or after your move), I'd like to see
the following patch committed. The current "reset" code doesn't follow
the sequence described in the manual, and doesn't really reset the chip.
Until I added this code, the RTC usually would simply not advance. I've
tested this thoroughly on Beech (405LP 1.1).
Also, the comment makes me curious - why rely on the BIOS to set the
right input frequency? It's just one more line of code here (and a
#define or two for the various boards).
===== beech.c 1.8 vs edited =====
--- 1.8/arch/ppc/platforms/beech.c Mon Nov 11 11:57:56 2002
+++ edited/beech.c Thu Dec 12 10:05:01 2002
@@ -280,10 +280,15 @@
/* Reset the core and ensure it's enabled. We assume
only that the BIOS has set the correct frequency. */
-
- mtdcr(DCRN_RTC0_WRAP, 0);
+
+ mtdcr(DCRN_RTC0_WRAP, 0); /* toggle NRST & NMR */
mtdcr(DCRN_RTC0_WRAP, 3);
- mtdcr(DCRN_RTC0_CR1, mfdcr(DCRN_RTC0_CR1) & 0x7f);
+ mtdcr(DCRN_RTC0_CR0, 0x60); /* No divider chain, No
square wave */
+ mtdcr(DCRN_RTC0_CR1, 0x80); /* Disable update cycles
/interrupts*/
+ mtdcr(DCRN_RTC0_WRAP, 0); /* toggle NRST & NMR */
+ mtdcr(DCRN_RTC0_WRAP, 3);
+ mtdcr(DCRN_RTC0_CR1, mfdcr(DCRN_RTC0_CR1) & 0x7f); /* allow upda
tes */
+
not_initialized = 0;
}
-Hollis
--
PowerPC Linux
IBM Linux Technology Center
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-12-12 16:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-12 3:54 Move 405LP RTC support from beech.c into ibm405lp.c David Gibson
2002-12-12 16:17 ` Hollis Blanchard [this message]
2002-12-12 23:13 ` David Gibson
2002-12-12 18:49 ` Todd Poynor
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=1039709875.3537.20.camel@granite.austin.ibm.com \
--to=hollis@austin.ibm.com \
--cc=david@gibson.dropbear.id.au \
--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).