summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2004-06-09 11:18:00 +0000
committerDamien Miller <djm@cvs.openbsd.org>2004-06-09 11:18:00 +0000
commit9b2d341c4488ef64279598daf35901666b72ec62 (patch)
tree2c8b4b7a9c8ea51c325866cc6507ee1da31334c8 /sys/arch
parent52cc38e9ba0f664333019f0be29c25d49173b51f (diff)
fix compilation for !I586_CPU case; ok grange@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/pci/elan520.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/pci/elan520.c b/sys/arch/i386/pci/elan520.c
index a81e9f2a419..db57f43f30d 100644
--- a/sys/arch/i386/pci/elan520.c
+++ b/sys/arch/i386/pci/elan520.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elan520.c,v 1.9 2004/06/06 17:34:37 grange Exp $ */
+/* $OpenBSD: elan520.c,v 1.10 2004/06/09 11:17:59 djm Exp $ */
/* $NetBSD: elan520.c,v 1.4 2002/10/02 05:47:15 thorpej Exp $ */
/*-
@@ -269,12 +269,16 @@ elansc_wdogctl_cb(void *self, int period)
void
elansc_update_cpuspeed(void)
{
+#ifdef I586_CPU
static const int elansc_mhz[] = { 0, 100, 133, 999 };
+#endif
uint8_t cpuctl;
cpuctl = bus_space_read_1(elansc->sc_memt, elansc->sc_memh,
MMCR_CPUCTL);
+#ifdef I586_CPU
pentium_mhz = elansc_mhz[cpuctl & CPUCTL_CPU_CLK_SPD_MASK];
+#endif
}
int