PERFORCE change 105197 for review
Olivier Houchard
cognet at FreeBSD.org
Sun Aug 27 23:57:34 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=105197
Change 105197 by cognet at cognet on 2006/08/27 23:56:45
Fix the timecounter by using the timestamp timer instead of the
general purpose timer.
The rational behind this is that we set up the general purpose
timer to tick, so to reset back to 0, every hz, while the MI
timecounter code expects it to reach 0xffffffff, as we provide a
counter_mask of 0xffffffff. We could hack the countermask to fit the
max value, or use the second general purpose timer to do so, but
I think it doesn't worth the trouble.
Affected files ...
.. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_timer.c#2 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_timer.c#2 (text+ko) ====
@@ -79,10 +79,6 @@
static struct ixpclk_softc *ixpclk_sc = NULL;
-#define GET_TIMER_VALUE(sc) (bus_space_read_4((sc)->sc_iot, \
- (sc)->sc_ioh, \
- IXP425_OST_TIM0))
-
#define GET_TS_VALUE(sc) (*(volatile u_int32_t *) \
(IXP425_TIMER_VBASE + IXP425_OST_TS))
@@ -138,10 +134,9 @@
static unsigned
ixp425_timer_get_timecount(struct timecounter *tc)
{
- struct ixpclk_softc* sc = ixpclk_sc;
uint32_t ret;
- ret = GET_TIMER_VALUE(sc);
+ ret = GET_TS_VALUE(sc);
return (ret);
}
More information about the p4-projects
mailing list