From: Hollis Blanchard <hollis@austin.ibm.com>
To: embedded list <linuxppc-embedded@lists.linuxppc.org>
Subject: 405LP compile fix
Date: 18 Dec 2002 09:49:24 -0600 [thread overview]
Message-ID: <1040226565.29647.15.camel@granite.austin.ibm.com> (raw)
I'm glad I'm not the only one who sometimes doesn't compile-test his
patches... ;)
This patch fixes the Beech build, which is calling the now-nonexistant
function beech_time_init. In actuality beech_calibrate_decr was never called
anyways... :)
Please apply to _2_4_devel.
-Hollis
--
PowerPC Linux
IBM Linux Technology Center
===== arch/ppc/platforms/beech.c 1.9 vs edited =====
--- 1.9/arch/ppc/platforms/beech.c Thu Dec 12 17:06:37 2002
+++ edited/arch/ppc/platforms/beech.c Tue Dec 17 13:47:47 2002
@@ -253,64 +253,6 @@
/* Set RTS/CTS mode for UART 1 */
*beech_fpga_reg_2 |= FPGA_REG_2_DEFAULT_UART1_N;
-}
-
-void __init
-beech_calibrate_decr(void)
-{
- ulong freq;
- ulong tbl, tbu;
- long i, loop_count;
- u_char sec;
-
- beech_time_init();
-
- /*
- * Actually this is bad for precision, we should have a loop in
- * which we only read the seconds counter. todc_read_val writes
- * the address bytes on every call and this takes a lot of time.
- * Perhaps an nvram_wait_change method returning a time
- * stamp with a loop count as parameter would be the solution.
- */
- /*
- * Need to make sure the tbl doesn't roll over so if tbu increments
- * during this test, we need to do it again.
- */
- loop_count = 0;
-
- sec = mfdcr(DCRN_RTC0_SEC) & 0x7f;
-
- do {
- tbu = get_tbu();
-
- for (i = 0 ; i < 10000000 ; i++) {/* may take up to 1 second */
- tbl = get_tbl();
-
- if ((mfdcr(DCRN_RTC0_SEC) & 0x7f) != sec) {
- break;
- }
- }
-
- sec = mfdcr(DCRN_RTC0_SEC) & 0x7f;
-
- for (i = 0 ; i < 10000000 ; i++) { /* Should take 1 second */
- freq = get_tbl();
-
- if ((mfdcr(DCRN_RTC0_SEC) & 0x7f) != sec) {
- break;
- }
- }
-
- freq -= tbl;
- } while ((get_tbu() != tbu) && (++loop_count < 2));
-
- printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
- freq/1000000, freq%1000000);
-
- tb_ticks_per_jiffy = freq / HZ;
- tb_to_us = mulhwu_scale_factor(freq, 1000000);
-
- return;
}
/*
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next reply other threads:[~2002-12-18 15:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-18 15:49 Hollis Blanchard [this message]
2002-12-19 2:51 ` 405LP compile fix David Gibson
[not found] <1040154588.1100.171.camel@granite.austin.ibm.com>
2002-12-17 23:31 ` Hollis Blanchard
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=1040226565.29647.15.camel@granite.austin.ibm.com \
--to=hollis@austin.ibm.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).