summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/macppc/conf/GENERIC5
-rw-r--r--sys/arch/macppc/conf/RAMDISK5
-rw-r--r--sys/arch/macppc/conf/files.macppc4
-rw-r--r--sys/arch/macppc/dev/openpic.c9
4 files changed, 15 insertions, 8 deletions
diff --git a/sys/arch/macppc/conf/GENERIC b/sys/arch/macppc/conf/GENERIC
index 277202feb8b..b7d96f28ba5 100644
--- a/sys/arch/macppc/conf/GENERIC
+++ b/sys/arch/macppc/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.111 2005/11/17 00:44:46 deraadt Exp $g
+# $OpenBSD: GENERIC,v 1.112 2005/11/17 15:03:52 drahn Exp $g
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -33,6 +33,7 @@ cpu* at mainbus0
mpcpcibr* at mainbus0 # MPC106 PCI Bridge.
memc* at mainbus0
+openpic* at memc? # openpic interrupt controller
ki2c* at memc? # Keywest I2C
pchb* at pci?
ht* at mainbus0
@@ -120,7 +121,7 @@ ubsec* at pci? # Broadcom 58xx
safe* at pci? # SafeNet SafeXcel 1141/1741
macintr0 at macobio? # old interrupt controller
-openpic0 at macobio? # openpic interrupt controller
+openpic* at macobio? # openpic interrupt controller
bm* at macobio? # BMAC ethernet
#mc* at macobio? # MACE ethernet
#esp* at macobio? flags 0x00ff # 53c9x SCSI
diff --git a/sys/arch/macppc/conf/RAMDISK b/sys/arch/macppc/conf/RAMDISK
index 5596115547e..5100fd4bfe6 100644
--- a/sys/arch/macppc/conf/RAMDISK
+++ b/sys/arch/macppc/conf/RAMDISK
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK,v 1.57 2005/11/15 01:12:49 brad Exp $
+# $OpenBSD: RAMDISK,v 1.58 2005/11/17 15:03:52 drahn Exp $
#
# PPC GENERIC config file
#
@@ -33,6 +33,7 @@ cpu* at mainbus0
mpcpcibr* at mainbus0 # MPC106 PCI Bridge.
memc* at mainbus0
+openpic* at memc? # openpic interrupt controller
ki2c* at memc? # Keywest I2C
pchb* at pci? # host bridge identifiers
ht* at mainbus0
@@ -106,7 +107,7 @@ ciphy* at mii? # Cicada CS8201 10/100/1000 copper PHY
ukphy* at mii? # generic unknown PHYs
macintr0 at macobio? # old interrupt controller
-openpic0 at macobio? # openpic interrupt controller
+openpic* at macobio? # openpic interrupt controller
bm* at macobio? # bmac ethernet
#mc* at macobio? # MACE ethernet
#esp* at macobio? flags 0x00ff# 53c9x SCSI
diff --git a/sys/arch/macppc/conf/files.macppc b/sys/arch/macppc/conf/files.macppc
index 922d76e5123..64ea931cd8d 100644
--- a/sys/arch/macppc/conf/files.macppc
+++ b/sys/arch/macppc/conf/files.macppc
@@ -1,4 +1,4 @@
-# $OpenBSD: files.macppc,v 1.39 2005/11/16 12:28:54 kettenis Exp $
+# $OpenBSD: files.macppc,v 1.40 2005/11/17 15:03:52 drahn Exp $
#
# macppc-specific configuration info
@@ -141,7 +141,7 @@ attach macintr at macobio
file arch/macppc/dev/macintr.c macintr
device openpic {}
-attach openpic at macobio
+attach openpic at macobio, memc
file arch/macppc/dev/openpic.c openpic
device zsc {[channel = -1]}
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index 9b48bb02b85..527660176d7 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.32 2005/10/16 04:30:43 drahn Exp $ */
+/* $OpenBSD: openpic.c,v 1.33 2005/11/17 15:03:51 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -108,10 +108,15 @@ int
openpic_match(struct device *parent, void *cf, void *aux)
{
char type[40];
+ int pirq;
struct confargs *ca = aux;
bzero (type, sizeof(type));
+ if (OF_getprop(ca->ca_node, "interrupt-parent", &pirq, sizeof(pirq))
+ == sizeof(pirq))
+ return 0; /* XXX */
+
if (strcmp(ca->ca_name, "interrupt-controller") == 0 ||
strcmp(ca->ca_name, "mpic") == 0) {
OF_getprop(ca->ca_node, "device_type", type, sizeof(type));
@@ -140,7 +145,7 @@ openpic_attach(struct device *parent, struct device *self, void *aux)
extern intr_disestablish_t *mac_intr_disestablish_func;
openpic_base = (vaddr_t) mapiodev (ca->ca_baseaddr +
- ca->ca_reg[0], 0x22000);
+ ca->ca_reg[0], 0x40000);
printf(": version 0x%x", openpic_read(OPENPIC_VENDOR_ID));