* Re: 405LP compile fix
[not found] <1040154588.1100.171.camel@granite.austin.ibm.com>
@ 2002-12-17 23:31 ` Hollis Blanchard
0 siblings, 0 replies; 3+ messages in thread
From: Hollis Blanchard @ 2002-12-17 23:31 UTC (permalink / raw)
To: embedded list
On Tue, 2002-12-17 at 13:49, Hollis Blanchard wrote:
>
> This patch fixes the Beech build, which is calling the now-nonexistant
> function beech_time_init. In actuality beech_time_init was never called
> anyways... :)
Oops, I meant to say "beech_calibrate_decr was never called anyways",
but you knew what I meant...
-Hollis
--
PowerPC Linux
IBM Linux Technology Center
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* 405LP compile fix
@ 2002-12-18 15:49 Hollis Blanchard
2002-12-19 2:51 ` David Gibson
0 siblings, 1 reply; 3+ messages in thread
From: Hollis Blanchard @ 2002-12-18 15:49 UTC (permalink / raw)
To: embedded list
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 405LP compile fix
2002-12-18 15:49 405LP compile fix Hollis Blanchard
@ 2002-12-19 2:51 ` David Gibson
0 siblings, 0 replies; 3+ messages in thread
From: David Gibson @ 2002-12-19 2:51 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: embedded list
On Wed, Dec 18, 2002 at 09:49:24AM -0600, Hollis Blanchard wrote:
>
> 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... :)
Oops, wasn't paying enough attention to your post.
> Please apply to _2_4_devel.
Applied.
--
David Gibson | For every complex problem there is a
david@gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-19 2:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-18 15:49 405LP compile fix Hollis Blanchard
2002-12-19 2:51 ` David Gibson
[not found] <1040154588.1100.171.camel@granite.austin.ibm.com>
2002-12-17 23:31 ` Hollis Blanchard
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).