Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev On-board devices on psycho machines see...
details: https://anonhg.NetBSD.org/src/rev/317279eee93c
branches: trunk
changeset: 495364:317279eee93c
user: pk <pk%NetBSD.org@localhost>
date: Wed Jul 26 17:46:56 2000 +0000
description:
On-board devices on psycho machines seem to have the `interrupt' property
in the parent bus format (i.e. an INO) rather than being represented as
an PCI interrupt line. Provide a hack to work around this in pci_attach_hook().
diffstat:
sys/arch/sparc64/dev/pci_machdep.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diffs (43 lines):
diff -r 2ea9d4e98420 -r 317279eee93c sys/arch/sparc64/dev/pci_machdep.c
--- a/sys/arch/sparc64/dev/pci_machdep.c Wed Jul 26 17:30:59 2000 +0000
+++ b/sys/arch/sparc64/dev/pci_machdep.c Wed Jul 26 17:46:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.14 2000/07/18 11:37:31 pk Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.15 2000/07/26 17:46:56 pk Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@@ -189,6 +189,7 @@
continue;
DPRINTF(SPDB_INTFIX, ("... BINGO! ..."));
+ bingo:
/*
* OK! we found match. pull out the old interrupt
* register, patch in the new value, and put it back.
@@ -203,6 +204,25 @@
DPRINTF((SPDB_INTFIX|SPDB_INTMAP), ("\n\t ; reread %x from intreg", intr));
break;
}
+ if (i == pp->pp_nintmap) {
+ /*
+ * Not matched by parent interrupt map. If the
+ * interrupt property has the INTMAP_OBIO bit
+ * set, assume the PROM has (wrongly) supplied it
+ * in the parent's bus format, rather than as a
+ * PCI interrupt line number.
+ *
+ * This seems to be an issue only with the
+ * psycho host-to-pci bridge.
+ */
+ if (pp->pp_sc->sc_mode == PSYCHO_MODE_PSYCHO &&
+ (*ip & INTMAP_OBIO) != 0) {
+ DPRINTF((SPDB_INTFIX|SPDB_INTMAP),
+ ("\n\t; PSYCHO: no match but obio interrupt in parent format"));
+
+ i = -1; goto bingo; /* XXX - hackish.. */
+ }
+ }
/* enable mem & dma if not already */
pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
Home |
Main Index |
Thread Index |
Old Index