diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2008-11-22 17:08:04 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2008-11-22 17:08:04 +0000 |
commit | 07d77c415e0b9b2302e64ec2ca4f4981da1fe60d (patch) | |
tree | eccc5e55b6abd4c718f9f711dbb3d8df3134b96e | |
parent | 1c115c2f30d8e245da8f01d78fbfeec62ae0945e (diff) |
freq is specific to APM, and it is reaching out to grab the APM variable,
however this global variable doesn't exist with out apm, ifdef the variable.
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0.c b/sys/arch/arm/xscale/pxa2x0.c index 87ce3cc7bbe..6c2ccec9e01 100644 --- a/sys/arch/arm/xscale/pxa2x0.c +++ b/sys/arch/arm/xscale/pxa2x0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0.c,v 1.14 2008/07/03 03:00:37 ray Exp $ */ +/* $OpenBSD: pxa2x0.c,v 1.15 2008/11/22 17:08:03 drahn Exp $ */ /* $NetBSD: pxa2x0.c,v 1.5 2003/12/12 16:42:44 thorpej Exp $ */ /* @@ -150,7 +150,9 @@ void pxaip_attach(struct device *parent, struct device *self, void *aux) { struct pxaip_softc *sc = (struct pxaip_softc *)self; +#ifdef __APM__ extern int freq; +#endif int cpuclock; pxaip_sc = sc; @@ -172,7 +174,9 @@ pxaip_attach(struct device *parent, struct device *self, void *aux) cpuclock = pxaip_measure_cpuclock(sc) / 1000; if (cpuclock % 1000 > 500) cpuclock = cpuclock + 1000 - cpuclock % 1000; +#ifdef __APM__ freq = cpuclock / 1000; +#endif printf(": CPU clock = %d.%03d MHz\n", cpuclock/1000, cpuclock%1000); |