summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/pci/pci_kn300.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-07-22 18:45:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-07-22 18:45:52 +0000
commit789f154baaec675b334ee405c5fc0ce00d31604e (patch)
tree1f71497a9a92c33a1a104c1e585dad126e345e2c /sys/arch/alpha/pci/pci_kn300.c
parent0ce330d43c73814da55f95ceec87f811685c0922 (diff)
Modify pci_intr_map() implementation to pass the pci_attach_args to the
per-platform implementation, instead of selected members of it; this allows us to get rid of some globals, and paves the way for better bridge support on some models.
Diffstat (limited to 'sys/arch/alpha/pci/pci_kn300.c')
-rw-r--r--sys/arch/alpha/pci/pci_kn300.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/arch/alpha/pci/pci_kn300.c b/sys/arch/alpha/pci/pci_kn300.c
index 60e8a88a925..72b2a9bd9ae 100644
--- a/sys/arch/alpha/pci/pci_kn300.c
+++ b/sys/arch/alpha/pci/pci_kn300.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_kn300.c,v 1.1 2007/03/16 21:22:27 robert Exp $ */
+/* $OpenBSD: pci_kn300.c,v 1.2 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_kn300.c,v 1.28 2005/12/11 12:16:17 christos Exp $ */
/*
@@ -59,12 +59,12 @@
#include <alpha/pci/siovar.h>
#endif
-int dec_kn300_intr_map (void *, pcitag_t, int, int, pci_intr_handle_t *);
+int dec_kn300_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
-const char *dec_kn300_intr_string (void *, pci_intr_handle_t);
-void *dec_kn300_intr_establish (void *, pci_intr_handle_t,
+const char *dec_kn300_intr_string(void *, pci_intr_handle_t);
+void *dec_kn300_intr_establish(void *, pci_intr_handle_t,
int, int (*func)(void *), void *, char *);
-void dec_kn300_intr_disestablish (void *, void *);
+void dec_kn300_intr_disestablish(void *, void *);
#define KN300_PCEB_IRQ 16
#define NPIN 4
@@ -116,14 +116,14 @@ pci_kn300_pickintr(ccp, first)
}
int
-dec_kn300_intr_map(ccv, bustag, buspin, line, ihp)
- void *ccv;
- pcitag_t bustag;
- int buspin, line;
+dec_kn300_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct mcpcia_config *ccp = ccv;
- pci_chipset_tag_t pc = &ccp->cc_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin;
+ pci_chipset_tag_t pc = pa->pa_pc;
+ struct mcpcia_config *ccp = (struct mcpcia_config *)pc->pc_intr_v;
int device;
int mcpcia_irq;