Module Name: src
Committed By: jmcneill
Date: Wed Jan 16 23:27:06 UTC 2013
Modified Files:
src/sys/arch/arm/omap: omap2_mputmr.c
Log Message:
calc_timer_factors: use supplied ints_per_sec, not hz, when calculating
counter frequency.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/omap/omap2_mputmr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/omap/omap2_mputmr.c
diff -u src/sys/arch/arm/omap/omap2_mputmr.c:1.4 src/sys/arch/arm/omap/omap2_mputmr.c:1.5
--- src/sys/arch/arm/omap/omap2_mputmr.c:1.4 Fri Jul 1 20:30:21 2011
+++ src/sys/arch/arm/omap/omap2_mputmr.c Wed Jan 16 23:27:05 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_mputmr.c,v 1.4 2011/07/01 20:30:21 dyoung Exp $ */
+/* $NetBSD: omap2_mputmr.c,v 1.5 2013/01/16 23:27:05 jmcneill Exp $ */
/*
* OMAP 2430 GP timers
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap2_mputmr.c,v 1.4 2011/07/01 20:30:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_mputmr.c,v 1.5 2013/01/16 23:27:05 jmcneill Exp $");
#include "opt_omap.h"
#include "opt_cpuoptions.h"
@@ -317,7 +317,7 @@ calc_timer_factors(int ints_per_sec, tim
for (;;) {
ptv_power = 1 << tf->ptv;
count_freq = OMAP_MPU_TIMER_CLOCK_FREQ;
- count_freq /= hz;
+ count_freq /= ints_per_sec;
count_freq /= ptv_power;
tf->reload = -count_freq;
tf->counts_per_usec = count_freq / us_per_sec;