summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2005-12-09 23:52:51 +0000
committercognet <cognet@FreeBSD.org>2005-12-09 23:52:51 +0000
commit24415ea106fd2499e40da73abdab7a32d7b00cdb (patch)
treeeddd4eff56d3da42425157cd6434c82f11861812
parent29be5fb867706a87e60198e9b048335309b7edae (diff)
downloadFreeBSD-src-24415ea106fd2499e40da73abdab7a32d7b00cdb.zip
FreeBSD-src-24415ea106fd2499e40da73abdab7a32d7b00cdb.tar.gz
The IQ80321 clock is 200MHz, but the IQ80321 is 198MHz, so add a kernel option
to override the frequency
-rw-r--r--sys/arm/xscale/i80321/i80321_timer.c5
-rw-r--r--sys/arm/xscale/i80321/std.iq312441
-rw-r--r--sys/conf/options.arm1
3 files changed, 7 insertions, 0 deletions
diff --git a/sys/arm/xscale/i80321/i80321_timer.c b/sys/arm/xscale/i80321/i80321_timer.c
index 66d34ef..c309cc0 100644
--- a/sys/arm/xscale/i80321/i80321_timer.c
+++ b/sys/arm/xscale/i80321/i80321_timer.c
@@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$");
#include <arm/xscale/xscalevar.h>
+#include "opt_timer.h"
+
void (*i80321_hardclock_hook)(void) = NULL;
struct i80321_timer_softc {
device_t dev;
@@ -74,7 +76,10 @@ static uint32_t counts_per_hz;
static int ticked = 0;
+#ifndef COUNTS_PER_SEC
#define COUNTS_PER_SEC 200000000 /* 200MHz */
+#endif
+
#define COUNTS_PER_USEC (COUNTS_PER_SEC / 1000000)
static struct timecounter i80321_timer_timecounter = {
diff --git a/sys/arm/xscale/i80321/std.iq31244 b/sys/arm/xscale/i80321/std.iq31244
index 5994c6a..c4c23bf 100644
--- a/sys/arm/xscale/i80321/std.iq31244
+++ b/sys/arm/xscale/i80321/std.iq31244
@@ -4,3 +4,4 @@ include "../xscale/i80321/std.i80321"
files "../xscale/i80321/files.iq31244"
makeoptions KERNPHYSADDR=0xa0200000
makeoptions KERNVIRTADDR=0xc0200000
+options COUNTS_PER_SEC=198000000
diff --git a/sys/conf/options.arm b/sys/conf/options.arm
index 22c80c3..d623efa 100644
--- a/sys/conf/options.arm
+++ b/sys/conf/options.arm
@@ -4,6 +4,7 @@ ARM9_CACHE_WRITE_THROUGH opt_global.h
ARM_CACHE_LOCK_ENABLE opt_global.h
ARMFPE opt_global.h
ARM_USE_SMALL_ALLOC opt_global.h
+COUNTS_PER_SEC opt_timer.h
CPU_SA1100 opt_global.h
CPU_SA1110 opt_global.h
CPU_ARM9 opt_global.h
OpenPOWER on IntegriCloud