summaryrefslogtreecommitdiff
path: root/sys/arch/arm/sa11x0
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2005-01-24 22:57:17 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2005-01-24 22:57:17 +0000
commit6180e1255a136f7916f93dc97fe704c6ebd5f565 (patch)
treeed0b29e83c5f51b81ba05613d74e6463166a6f99 /sys/arch/arm/sa11x0
parentd9a0dc0f4bcf7d5ac6f5316f003783365d410075 (diff)
Ok, this driver is being abused and used on pxa270, however it's OS timer clock
rate is different. set the time to the correct value for pxa270, defaulting to the old value on other processors.
Diffstat (limited to 'sys/arch/arm/sa11x0')
-rw-r--r--sys/arch/arm/sa11x0/sa11x0_ost.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/arm/sa11x0/sa11x0_ost.c b/sys/arch/arm/sa11x0/sa11x0_ost.c
index 89d9ac6c2a5..dbf7e8c46ea 100644
--- a/sys/arch/arm/sa11x0/sa11x0_ost.c
+++ b/sys/arch/arm/sa11x0/sa11x0_ost.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa11x0_ost.c,v 1.4 2005/01/11 21:00:17 deraadt Exp $ */
+/* $OpenBSD: sa11x0_ost.c,v 1.5 2005/01/24 22:57:16 drahn Exp $ */
/* $NetBSD: sa11x0_ost.c,v 1.11 2003/07/15 00:24:51 lukem Exp $ */
/*
@@ -80,7 +80,9 @@ struct saost_softc {
static struct saost_softc *saost_sc = NULL;
-#define TIMER_FREQUENCY 3686400 /* 3.6864MHz */
+#define DEF_TIMER_FREQUENCY 3686400 /* 3.6864MHz */
+int saost_timer_freq =DEF_TIMER_FREQUENCY;
+#define TIMER_FREQUENCY saost_timer_freq
#define TICKS_PER_MICROSECOND (TIMER_FREQUENCY/1000000)
#ifndef STATHZ
@@ -125,6 +127,11 @@ saost_attach(parent, self, aux)
saost_sc = sc;
+ /* XXX */
+ if ((cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA27X)
+ TIMER_FREQUENCY = 3250000; /* XXX */
+
+
if(bus_space_map(sa->sa_iot, sa->sa_addr, sa->sa_size, 0,
&sc->sc_ioh))
panic("%s: Cannot map registers", self->dv_xname);