PERFORCE change 111741 for review
Bernd Walter
ticso at FreeBSD.org
Fri Dec 15 06:55:17 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=111741
Change 111741 by ticso at ticso on 2006/12/15 14:54:52
Use the next possible value for hz instead of defaulting to 128
Update tick value after modifying hz.
Affected files ...
.. //depot/projects/arm/src/sys/arm/at91/at91_st.c#15 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/at91/at91_st.c#15 (text+ko) ====
@@ -201,11 +201,14 @@
void *ih;
device_t dev = timer_softc->sc_dev;
+ rel_value = 32768 / hz;
+ if (rel_value < 1)
+ rel_value = 1;
if (32768 % hz) {
- printf("Cannot get %d Hz clock; using 128Hz\n", hz);
- hz = 128;
+ printf("Cannot get %d Hz clock; using %dHz\n", hz, 32768 / rel_value);
+ hz = 32768 / rel_value;
+ tick = 1000000 / hz;
}
- rel_value = 32768 / hz;
/* Disable all interrupts. */
WR4(ST_IDR, 0xffffffff);
/* The system timer shares the system irq (1) */
More information about the p4-projects
mailing list