Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Aug 2006 23:57:32 GMT
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 105197 for review
Message-ID:  <200608272357.k7RNvW4A015999@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105197

Change 105197 by cognet@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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608272357.k7RNvW4A015999>