diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-15 21:13:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-15 21:13:29 +0000 |
commit | c7944dc0d2be35242202bdad3b511d6b6e60cf3a (patch) | |
tree | 49728a73374c694c8937e8c1903dabf1e19ec820 /sys/arch/pmax/include/autoconf.h | |
parent | 9923345416a4c9f9c668f0ca1c8b259113aac9e7 (diff) |
sync to netbsd; for graichen
Diffstat (limited to 'sys/arch/pmax/include/autoconf.h')
-rw-r--r-- | sys/arch/pmax/include/autoconf.h | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/sys/arch/pmax/include/autoconf.h b/sys/arch/pmax/include/autoconf.h index 7f5c589393e..59c3eaa6791 100644 --- a/sys/arch/pmax/include/autoconf.h +++ b/sys/arch/pmax/include/autoconf.h @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.h,v 1.3 1996/01/11 05:57:04 jonathan Exp $ */ +/* $NetBSD: autoconf.h,v 1.6.4.1 1996/05/30 04:07:36 mhitch Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -31,50 +31,43 @@ * Machine-dependent structures of autoconfiguration */ +#include <machine/tc_machdep.h> + struct confargs; + /* Handle device interrupt for given unit of a driver */ typedef void* intr_arg_t; /* pointer to some softc */ typedef int (*intr_handler_t) __P((intr_arg_t)); +/* + * XXX Establish interrupt on an arbitrary decstation/decsystem bus. + */ +extern void +generic_intr_establish __P(( void * parent, void * cookie, + int level, + intr_handler_t handler, intr_arg_t arg)); -struct abus { - struct device *ab_dv; /* back-pointer to device */ - int ab_type; /* bus type (see below) */ - void (*ab_intr_establish) /* bus's set-handler function */ - __P((struct confargs *, intr_handler_t, intr_arg_t)); - void (*ab_intr_disestablish) /* bus's unset-handler function */ - __P((struct confargs *)); - caddr_t (*ab_cvtaddr) /* convert slot/offset to address */ - __P((struct confargs *)); - int (*ab_matchname) /* see if name matches driver */ - __P((struct confargs *, char *)); -}; - -#define BUS_MAIN 1 /* mainbus */ -#define BUS_TC 2 /* TurboChannel */ -#define BUS_ASIC 3 /* IOCTL ASIC; under TurboChannel */ -#define BUS_TCDS 4 /* TCDS ASIC; under TurboChannel */ -#define KN02_ASIC_NAME "KN02 " /* very special */ +#define KN02_ASIC_NAME "KN02 " /* ROM name in 3max system slot */ -#define BUS_INTR_ESTABLISH(ca, handler, val) \ - (*(ca)->ca_bus->ab_intr_establish)((ca), (handler), (val)) -#define BUS_INTR_DISESTABLISH(ca) \ - (*(ca)->ca_bus->ab_intr_establish)(ca) -#define BUS_CVTADDR(ca) \ - (*(ca)->ca_bus->ab_cvtaddr)(ca) -#define BUS_MATCHNAME(ca, name) \ - (*(ca)->ca_bus->ab_matchname)((ca), (name)) +#define INTR_ESTABLISH(parent, cookie, level, handler, val) \ + generic_intr_establish((parent), (cookie), (level), (handler), (val)) + +#define BUS_INTR_ESTABLISH(ca, handler, val) \ + generic_intr_establish( ((struct device*)(val))->dv_parent, \ + (void*)(ca)->ca_slotpri, 0, (handler), (val)) + struct confargs { char *ca_name; /* Device name. */ int ca_slot; /* Device slot (table entry). */ int ca_offset; /* Offset into slot. */ + tc_addr_t ca_addr; /* Device address. */ int ca_slotpri; /* Device interrupt "priority" */ - struct abus *ca_bus; /* bus device resides on. */ }; +extern caddr_t baseboard_cvtaddr __P((struct confargs *)); /*XXX*/ #ifndef pmax void set_clockintr __P((void (*)(struct clockframe *))); |