From owner-p4-projects@FreeBSD.ORG Sun Aug 27 23:57:33 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B93CF16A4E1; Sun, 27 Aug 2006 23:57:33 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9677216A4DA for ; Sun, 27 Aug 2006 23:57:33 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3647043D45 for ; Sun, 27 Aug 2006 23:57:33 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7RNvX49016002 for ; Sun, 27 Aug 2006 23:57:33 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7RNvW4A015999 for perforce@freebsd.org; Sun, 27 Aug 2006 23:57:32 GMT (envelope-from cognet@freebsd.org) Date: Sun, 27 Aug 2006 23:57:32 GMT Message-Id: <200608272357.k7RNvW4A015999@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 105197 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Aug 2006 23:57:34 -0000 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); }