summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2013-05-03 17:58:16 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2013-05-03 17:58:16 +0000
commit003e93d5a63fd6dbc3243236fc08ea85313ada0d (patch)
tree6a46d9f4065021c1ffcd0200aeb6b0d4ee25ef2f /sys
parentb656a66c4f8e75d95d86b796fa7840b7506b1f12 (diff)
Fix a shift in the beagle prcm.
ok jsg@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/beagle/dev/prcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/beagle/dev/prcm.c b/sys/arch/beagle/dev/prcm.c
index 538df01e731..6115304082f 100644
--- a/sys/arch/beagle/dev/prcm.c
+++ b/sys/arch/beagle/dev/prcm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prcm.c,v 1.9 2011/11/10 19:37:01 uwe Exp $ */
+/* $OpenBSD: prcm.c,v 1.10 2013/05/03 17:58:15 patrick Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -253,7 +253,7 @@ prcm_setclock(int clock, int speed)
int shift = (clock-2);
oreg = bus_space_read_4(prcm_iot, prcm_ioh, CM_CLKSEL_PER);
- mask = 1 << (mask);
+ mask = 1 << (shift);
reg = (oreg & ~mask) | ( (speed << shift) & mask);
printf(" prcm_setclock old %08x new %08x", oreg, reg);