summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-06-03 08:30:28 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-06-03 08:30:28 +0000
commit8f44be35f16869020f0ae3443698bf9c3ae1ae8c (patch)
tree52c40ca973a5cb2c989a2737c476ae07e709a1ea /sys/arch/macppc
parente327a2d462645de143fdb5fd45ef274feae4c2e8 (diff)
Check for the correct bit in the interrupts property of the device-tree
to determin if interrupts should be established as edge/level triggered. Fix audio interrupts on U4 systems. On such systems the "interrupts" fields in the device-tree has more bits set and cannot be compared to 0.
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/dev/i2s.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/macppc/dev/i2s.c b/sys/arch/macppc/dev/i2s.c
index 37e6d897bcc..0dd32fec96e 100644
--- a/sys/arch/macppc/dev/i2s.c
+++ b/sys/arch/macppc/dev/i2s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2s.c,v 1.27 2015/05/11 06:46:21 ratchov Exp $ */
+/* $OpenBSD: i2s.c,v 1.28 2015/06/03 08:30:27 mpi Exp $ */
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
@@ -115,9 +115,9 @@ i2s_attach(struct device *parent, struct i2s_softc *sc, struct confargs *ca)
cirq = intr[0];
oirq = intr[2];
iirq = intr[4];
- cirq_type = intr[1] ? IST_LEVEL : IST_EDGE;
- oirq_type = intr[3] ? IST_LEVEL : IST_EDGE;
- iirq_type = intr[5] ? IST_LEVEL : IST_EDGE;
+ cirq_type = (intr[1] & 1) ? IST_LEVEL : IST_EDGE;
+ oirq_type = (intr[3] & 1) ? IST_LEVEL : IST_EDGE;
+ iirq_type = (intr[5] & 1) ? IST_LEVEL : IST_EDGE;
/* intr_establish(cirq, cirq_type, IPL_AUDIO, i2s_intr, sc); */
mac_intr_establish(parent, oirq, oirq_type, IPL_AUDIO | IPL_MPSAFE,