From owner-p4-projects@FreeBSD.ORG Fri Dec 15 14:55:17 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 3034D16A4C8; Fri, 15 Dec 2006 14:55:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E716816A492 for ; Fri, 15 Dec 2006 14:55:16 +0000 (UTC) (envelope-from ticso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2A7243CA0 for ; Fri, 15 Dec 2006 14:53:34 +0000 (GMT) (envelope-from ticso@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 kBFEtGYk049416 for ; Fri, 15 Dec 2006 14:55:16 GMT (envelope-from ticso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kBFEtGKT049413 for perforce@freebsd.org; Fri, 15 Dec 2006 14:55:16 GMT (envelope-from ticso@freebsd.org) Date: Fri, 15 Dec 2006 14:55:16 GMT Message-Id: <200612151455.kBFEtGKT049413@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ticso@freebsd.org using -f From: Bernd Walter To: Perforce Change Reviews Cc: Subject: PERFORCE change 111741 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: Fri, 15 Dec 2006 14:55:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=111741 Change 111741 by ticso@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) */