summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2013-05-03 17:58:15 +0000
committerpatrick <patrick@openbsd.org>2013-05-03 17:58:15 +0000
commitb4db2e66832b2c3996d30ecb025ed88eb3a8790f (patch)
treee4d3d92b6f5970d177773fb5fcb45451e734fd3e
parentDon't return before calling splx. (diff)
downloadwireguard-openbsd-b4db2e66832b2c3996d30ecb025ed88eb3a8790f.tar.xz
wireguard-openbsd-b4db2e66832b2c3996d30ecb025ed88eb3a8790f.zip
Fix a shift in the beagle prcm.
ok jsg@
-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);