From 6180e1255a136f7916f93dc97fe704c6ebd5f565 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Mon, 24 Jan 2005 22:57:17 +0000 Subject: 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. --- sys/arch/arm/sa11x0/sa11x0_ost.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sys/arch/arm/sa11x0') 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); -- cgit v1.2.3