Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/pci Configure PCI_INTERRUPT_LINE on the othe...
details: https://anonhg.NetBSD.org/src/rev/e8ab6ef17680
branches: trunk
changeset: 501920:e8ab6ef17680
user: tsubai <tsubai%NetBSD.org@localhost>
date: Tue Jan 09 08:04:53 2001 +0000
description:
Configure PCI_INTERRUPT_LINE on the other side of the pci-bridge on OF3 too.
diffstat:
sys/arch/macppc/pci/pci_machdep.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 1a7931263dd0 -r e8ab6ef17680 sys/arch/macppc/pci/pci_machdep.c
--- a/sys/arch/macppc/pci/pci_machdep.c Tue Jan 09 07:18:49 2001 +0000
+++ b/sys/arch/macppc/pci/pci_machdep.c Tue Jan 09 08:04:53 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.14 2000/12/28 22:59:10 sommerfeld Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.15 2001/01/09 08:04:53 tsubai Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -392,14 +392,12 @@
/*
* We must read "#interrupt-cells" for each time because
- * interrupt-parent may be defferent.
- *
- * XXX assume #address-cells == 1
+ * interrupt-parent may be different.
*/
iparent = *mp++;
len -= 4;
if (OF_getprop(iparent, "#interrupt-cells", &icells, 4) != 4)
- return -1;
+ goto nomap;
/* Found. */
if (match == 0) {
@@ -423,6 +421,15 @@
len = OF_getprop(parent, "AAPL,interrupts", intr, 4) ;
if (len == 4)
return len;
+ /*
+ * XXX I don't know what is the correct local address.
+ * XXX Use the first entry for now.
+ */
+ len = OF_getprop(parent, "interrupt-map", map, sizeof(map));
+ if (len >= 36) {
+ addr = &map[5];
+ return find_node_intr(parent, addr, intr);
+ }
}
/* XXX This may be wrong... */
Home |
Main Index |
Thread Index |
Old Index