Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/dev deal with PowerMac7, * mac-io/i2s/sound r...
details: https://anonhg.NetBSD.org/src/rev/858ae0499a30
branches: trunk
changeset: 360746:858ae0499a30
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Mar 29 06:56:54 2018 +0000
description:
deal with PowerMac7,* mac-io/i2s/sound reg properties
now we map the right registers on G5 and get DMA interrupts. Still no sound
but - well - progress
diffstat:
sys/arch/macppc/dev/snapper.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r 7ce175117b8c -r 858ae0499a30 sys/arch/macppc/dev/snapper.c
--- a/sys/arch/macppc/dev/snapper.c Thu Mar 29 06:28:12 2018 +0000
+++ b/sys/arch/macppc/dev/snapper.c Thu Mar 29 06:56:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: snapper.c,v 1.44 2018/03/24 16:22:48 macallan Exp $ */
+/* $NetBSD: snapper.c,v 1.45 2018/03/29 06:56:54 macallan Exp $ */
/* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */
/* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.44 2018/03/24 16:22:48 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.45 2018/03/29 06:56:54 macallan Exp $");
#include <sys/param.h>
#include <sys/audioio.h>
@@ -763,6 +763,12 @@
sc->sc_baseaddr = ca->ca_baseaddr;
OF_getprop(soundbus, "reg", reg, sizeof reg);
+ /* deal with messed up properties on PowerMac7,3 abd friends */
+ if (reg[0] == 0) {
+ reg[0] += ca->ca_reg[0];
+ reg[2] += ca->ca_reg[2];
+ reg[4] += ca->ca_reg[2];
+ }
reg[0] += ca->ca_baseaddr;
reg[2] += ca->ca_baseaddr;
reg[4] += ca->ca_baseaddr;
@@ -770,6 +776,17 @@
sc->sc_node = ca->ca_node;
sc->sc_tag = ca->ca_tag;
+#ifdef SNAPPER_DEBUG
+ {
+ int i;
+ printf("\n");
+ for (i = 0; i < 6; i++) {
+ printf(" %08x", reg[i]);
+ }
+ printf("\n");
+ }
+#endif
+
bus_space_map(sc->sc_tag, reg[0], reg[1], 0, &sc->sc_bsh);
bus_space_map(sc->sc_tag, reg[2], reg[3],
BUS_SPACE_MAP_LINEAR, &sc->sc_odmah);
@@ -779,6 +796,8 @@
sc->sc_odma = bus_space_vaddr(sc->sc_tag, sc->sc_odmah);
sc->sc_idma = bus_space_vaddr(sc->sc_tag, sc->sc_idmah);
+ DPRINTF("reg %08x odma %08x\n", (uint32_t)sc->sc_bsh, (uint32_t)sc->sc_odmah);
+
OF_getprop(soundbus, "interrupts", intr, sizeof intr);
cirq = intr[0];
oirq = intr[2];
Home |
Main Index |
Thread Index |
Old Index