diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-06-26 18:19:44 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-06-26 18:19:44 +0000 |
commit | 5a387b616d2b4b2e54c16ba3f9e3086f399b333d (patch) | |
tree | 108845b3cd77c21fda9458cf417d03638dd40baf /sys/arch | |
parent | e816cf3344c5b942d0e8ab825f7d0eb98eae184c (diff) |
Cleanup of interrupt configuration, move prototypes to header file,
not in each file.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc/include/autoconf.h | 12 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/macintr.c | 7 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/openpic.c | 9 | ||||
-rw-r--r-- | sys/arch/powerpc/pci/macobio.c | 7 | ||||
-rw-r--r-- | sys/arch/powerpc/pci/mpcpcibus.c | 8 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/machdep.c | 5 |
6 files changed, 16 insertions, 32 deletions
diff --git a/sys/arch/powerpc/include/autoconf.h b/sys/arch/powerpc/include/autoconf.h index b7cda1e2401..94d157d792e 100644 --- a/sys/arch/powerpc/include/autoconf.h +++ b/sys/arch/powerpc/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.8 2001/06/24 23:26:28 drahn Exp $ */ +/* $OpenBSD: autoconf.h,v 1.9 2001/06/26 18:19:43 drahn Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -101,4 +101,14 @@ int badaddr __P((void *, u_int32_t)); void calc_delayconst(void); void ofrootfound(void); +typedef int mac_intr_handle_t; +typedef void *(intr_establish_t) __P((void *, mac_intr_handle_t, + int, int, int (*func)(void *), void *, char *)); +typedef void (intr_disestablish_t) __P((void *, void *)); + +intr_establish_t mac_intr_establish; +intr_disestablish_t mac_intr_disestablish; +extern intr_establish_t *intr_establish_func; +extern intr_disestablish_t *intr_disestablish_func; + #endif /* _MACHINE_AUTOCONF_H_ */ diff --git a/sys/arch/powerpc/mac/macintr.c b/sys/arch/powerpc/mac/macintr.c index 88641d3d8af..6fb703aee06 100644 --- a/sys/arch/powerpc/mac/macintr.c +++ b/sys/arch/powerpc/mac/macintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macintr.c,v 1.10 2001/06/25 23:29:56 drahn Exp $ */ +/* $OpenBSD: macintr.c,v 1.11 2001/06/26 18:19:43 drahn Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -144,11 +144,6 @@ u_int8_t *interrupt_reg; typedef void (void_f) (void); extern void_f *pending_int_f; int prog_switch (void *arg); -typedef int mac_intr_handle_t; - -typedef void *(intr_establish_t) __P((void *, mac_intr_handle_t, - int, int, int (*func)(void *), void *, char *)); -typedef void (intr_disestablish_t) __P((void *, void *)); intr_establish_t macintr_establish; intr_disestablish_t macintr_disestablish; diff --git a/sys/arch/powerpc/mac/openpic.c b/sys/arch/powerpc/mac/openpic.c index 41fd638f1ed..fb5523d860d 100644 --- a/sys/arch/powerpc/mac/openpic.c +++ b/sys/arch/powerpc/mac/openpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openpic.c,v 1.12 2001/06/25 23:29:56 drahn Exp $ */ +/* $OpenBSD: openpic.c,v 1.13 2001/06/26 18:19:43 drahn Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -134,11 +134,6 @@ u_int8_t *interrupt_reg; typedef void (void_f) (void); extern void_f *pending_int_f; static int prog_switch (void *arg); -typedef int mac_intr_handle_t; - -typedef void *(intr_establish_t) __P((void *, mac_intr_handle_t, - int, int, int (*func)(void *), void *, char *)); -typedef void (intr_disestablish_t) __P((void *, void *)); vaddr_t openpic_base; void * openpic_intr_establish( void * lcv, int irq, int type, int level, @@ -177,7 +172,7 @@ openpic_attach(parent, self, aux) #if 1 mac_intr_establish(parent, 0x37, IST_LEVEL, - IPL_HIGH, prog_switch, 0x37, "prog button"); + IPL_HIGH, prog_switch, (void*)0x37, "prog button"); #endif ppc_intr_enable(1); diff --git a/sys/arch/powerpc/pci/macobio.c b/sys/arch/powerpc/pci/macobio.c index 6ceaee0e2dc..50e0cab64fc 100644 --- a/sys/arch/powerpc/pci/macobio.c +++ b/sys/arch/powerpc/pci/macobio.c @@ -219,13 +219,6 @@ macobio_print(aux, macobio) #endif } -typedef int mac_intr_handle_t; - -typedef void *(intr_establish_t) __P((void *, mac_intr_handle_t, - int, int, int (*func)(void *), void *, char *)); -typedef void (intr_disestablish_t) __P((void *, void *)); - - void * undef_mac_establish(lcv, irq, type, level, ih_fun, ih_arg, name) void * lcv; diff --git a/sys/arch/powerpc/pci/mpcpcibus.c b/sys/arch/powerpc/pci/mpcpcibus.c index 08784d3d9e2..641dbb978b8 100644 --- a/sys/arch/powerpc/pci/mpcpcibus.c +++ b/sys/arch/powerpc/pci/mpcpcibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpcpcibus.c,v 1.29 2001/06/25 23:29:59 drahn Exp $ */ +/* $OpenBSD: mpcpcibus.c,v 1.30 2001/06/26 18:19:43 drahn Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -1034,12 +1034,6 @@ mpc_intr_string(lcv, ih) return(str); } -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 *)); -extern intr_establish_t *intr_establish_func; -extern intr_disestablish_t *intr_disestablish_func; - void * mpc_intr_establish(lcv, ih, level, func, arg, name) void *lcv; diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c index 98d9d481100..13a4af97de0 100644 --- a/sys/arch/powerpc/powerpc/machdep.c +++ b/sys/arch/powerpc/powerpc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.69 2001/06/26 05:17:04 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.70 2001/06/26 18:19:43 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1053,9 +1053,6 @@ systype(char *name) * */ #include <dev/pci/pcivar.h> -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 *)); int ppc_configed_intr_cnt = 0; struct intrhand ppc_configed_intr[MAX_PRECONF_INTR]; |