summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-08-25 10:13:31 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-08-25 10:13:31 +0000
commit17f1f0da9189e82c93381a61aace686d52339576 (patch)
treed816adac02b9344761cb3843f9fba856c754d419 /sys/arch/powerpc
parenteb53c59ffd7697d190539b5f500a59265109c9a1 (diff)
Change pci_intr_map to take pci_attach_args as an argument.
All callers actually took all arguments to pci_intr_map from pci_attach_args structs, so this simplifies code. This also allows more complicated interrupt assignment schemes like the one on sparc64. This makes sparc64 pci interrupts work. Inspired by the same change in NetBSD.
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/mac/if_gm.c5
-rw-r--r--sys/arch/powerpc/pci/pci_machdep.h7
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/powerpc/mac/if_gm.c b/sys/arch/powerpc/mac/if_gm.c
index 107d1eb4386..708180a7e20 100644
--- a/sys/arch/powerpc/mac/if_gm.c
+++ b/sys/arch/powerpc/mac/if_gm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gm.c,v 1.18 2001/08/08 21:08:33 miod Exp $ */
+/* $OpenBSD: if_gm.c,v 1.19 2001/08/25 10:13:29 art Exp $ */
/* $NetBSD: if_gm.c,v 1.2 2000/03/04 11:17:00 tsubai Exp $ */
/*-
@@ -236,8 +236,7 @@ gmac_attach(parent, self, aux)
#endif
#if 0
- if (pci_intr_map(pa->pa_pc, pa->pa_intrtag, pa->pa_intrpin,
- pa->pa_intrline, &ih)) {
+ if (pci_intr_map(pa, &ih)) {
printf(": unable to map interrupt\n");
return;
}
diff --git a/sys/arch/powerpc/pci/pci_machdep.h b/sys/arch/powerpc/pci/pci_machdep.h
index 2961afb9a10..4cb0eaa06a5 100644
--- a/sys/arch/powerpc/pci/pci_machdep.h
+++ b/sys/arch/powerpc/pci/pci_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.h,v 1.8 2001/08/17 22:26:58 mickey Exp $ */
+/* $OpenBSD: pci_machdep.h,v 1.9 2001/08/25 10:13:29 art Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -79,8 +79,9 @@ struct ppc_pci_chipset {
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
#define pci_conf_write(c, t, r, v) \
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
-#define pci_intr_map(c, it, ip, il, ihp) \
- (*(c)->pc_intr_map)((c)->pc_intr_v, (it), (ip), (il), (ihp))
+#define pci_intr_map(pa, ihp) \
+ (*((pa)->pa_pc)->pc_intr_map)((pa)->pa_pc->pc_intr_v, \
+ (pa)->pa_intrtag, (pa)->pa_intrpin, (pa)->pa_intrline, (ihp))
#define pci_intr_string(c, ih) \
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
#define pci_intr_establish(c, ih, l, h, a, nm) \