diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-08-17 22:26:59 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-08-17 22:26:59 +0000 |
commit | 5f794f8c1c7a349faa97c6ef092a96fcf48ca094 (patch) | |
tree | e2511d92dc642fc35e0925f4f7f3681fafc8f75f /sys/arch/mvmeppc | |
parent | 0c3296d28b7e353e842dc384702aebc7653387c5 (diff) |
provide a way to get the number used for irq line, not only a string
representation, this is needed for devices like cbb which pass
the interrupt line down to the cardbus attachment and not
getting the right line before pci_intr_map() has done it's
dirty deed.
tested on i386 by jason@, compiles on alpha by art@.
ppc and mveppc are to be test-compiled, but should work (;
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r-- | sys/arch/mvmeppc/pci/mpcpcibr.c | 12 | ||||
-rw-r--r-- | sys/arch/mvmeppc/pci/pci_machdep.h | 5 | ||||
-rw-r--r-- | sys/arch/mvmeppc/pci/raven.c | 12 |
3 files changed, 26 insertions, 3 deletions
diff --git a/sys/arch/mvmeppc/pci/mpcpcibr.c b/sys/arch/mvmeppc/pci/mpcpcibr.c index a268f777d5c..1d8aecc3ddd 100644 --- a/sys/arch/mvmeppc/pci/mpcpcibr.c +++ b/sys/arch/mvmeppc/pci/mpcpcibr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpcpcibr.c,v 1.2 2001/07/06 05:14:31 smurph Exp $ */ +/* $OpenBSD: mpcpcibr.c,v 1.3 2001/08/17 22:26:58 mickey Exp $ */ /* * Copyright (c) 2001 Steve Murphree, Jr. @@ -70,6 +70,7 @@ void mpc_conf_write __P((void *, pcitag_t, int, pcireg_t)); int mpc_intr_map __P((void *, pcitag_t, int, int, pci_intr_handle_t *)); const char *mpc_intr_string __P((void *, pci_intr_handle_t)); +int mpc_intr_line __P((void *, pci_intr_handle_t)); void *mpc_intr_establish __P((void *, pci_intr_handle_t, int, int (*func)(void *), void *, char *)); void mpc_intr_disestablish __P((void *, void *)); @@ -189,6 +190,7 @@ addbatmap(RAVEN_V_PCI_MEM_SPACE, RAVEN_P_PCI_MEM_SPACE, BAT_I); lcp->lc_pc.pc_intr_v = lcp; lcp->lc_pc.pc_intr_map = mpc_intr_map; lcp->lc_pc.pc_intr_string = mpc_intr_string; + lcp->lc_pc.pc_intr_line = mpc_intr_line; lcp->lc_pc.pc_intr_establish = mpc_intr_establish; lcp->lc_pc.pc_intr_disestablish = mpc_intr_disestablish; @@ -543,6 +545,14 @@ pci_intr_handle_t ih; return (str); } +int +mpc_intr_line(lcv, ih) + void *lcv; + pci_intr_handle_t ih; +{ + return (ih); +} + typedef void *(intr_establish_t) __P((void *, pci_intr_handle_t, int, int, int (*func)(void *), void *, char *)); typedef void (intr_disestablish_t) __P((void *, void *)); diff --git a/sys/arch/mvmeppc/pci/pci_machdep.h b/sys/arch/mvmeppc/pci/pci_machdep.h index 08181e158af..9bc610d1bcc 100644 --- a/sys/arch/mvmeppc/pci/pci_machdep.h +++ b/sys/arch/mvmeppc/pci/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.1 2001/06/26 21:57:57 smurph Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.2 2001/08/17 22:26:58 mickey Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -57,6 +57,7 @@ struct ppc_pci_chipset { int (*pc_intr_map) __P((void *, pcitag_t, int, int, pci_intr_handle_t *)); const char *(*pc_intr_string) __P((void *, pci_intr_handle_t)); + int (*pc_intr_line) __P((void *, pci_intr_handle_t)); void *(*pc_intr_establish) __P((void *, pci_intr_handle_t, int, int (*)(void *), void *, char *)); void (*pc_intr_disestablish) __P((void *, void *)); @@ -82,6 +83,8 @@ struct ppc_pci_chipset { (*(c)->pc_intr_map)((c)->pc_intr_v, (it), (ip), (il), (ihp)) #define pci_intr_string(c, ih) \ (*(c)->pc_intr_string)((c)->pc_intr_v, (ih)) +#define pci_intr_line(c, ih) \ + (*(c)->pc_intr_line)((c)->pc_intr_v, (ih)) #define pci_intr_establish(c, ih, l, h, a, nm) \ (*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a), (nm)) #define pci_intr_disestablish(c, iv) \ diff --git a/sys/arch/mvmeppc/pci/raven.c b/sys/arch/mvmeppc/pci/raven.c index 1747ee0e9a4..000c52cac77 100644 --- a/sys/arch/mvmeppc/pci/raven.c +++ b/sys/arch/mvmeppc/pci/raven.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raven.c,v 1.1 2001/06/26 21:57:57 smurph Exp $ */ +/* $OpenBSD: raven.c,v 1.2 2001/08/17 22:26:58 mickey Exp $ */ /* * Copyright (c) 2001 Steve Murphree, Jr. @@ -70,6 +70,7 @@ void mpc_conf_write __P((void *, pcitag_t, int, pcireg_t)); int mpc_intr_map __P((void *, pcitag_t, int, int, pci_intr_handle_t *)); const char *mpc_intr_string __P((void *, pci_intr_handle_t)); +int mpc_intr_line __P((void *, pci_intr_handle_t)); void *mpc_intr_establish __P((void *, pci_intr_handle_t, int, int (*func)(void *), void *, char *)); void mpc_intr_disestablish __P((void *, void *)); @@ -177,6 +178,7 @@ mpcpcibrattach(parent, self, aux) lcp->lc_pc.pc_intr_v = lcp; lcp->lc_pc.pc_intr_map = mpc_intr_map; lcp->lc_pc.pc_intr_string = mpc_intr_string; + lcp->lc_pc.pc_intr_line = mpc_intr_line; lcp->lc_pc.pc_intr_establish = mpc_intr_establish; lcp->lc_pc.pc_intr_disestablish = mpc_intr_disestablish; @@ -475,6 +477,14 @@ mpc_intr_string(lcv, ih) return(str); } +int +mpc_intr_string(lcv, ih) + void *lcv; + pci_intr_handle_t ih; +{ + return (ih); +} + typedef void *(intr_establish_t) __P((void *, pci_intr_handle_t, int, int, int (*func)(void *), void *, char *)); typedef void (intr_disestablish_t) __P((void *, void *)); |