1 /* $NetBSD: ibusvar.h,v 1.4 1999/03/15 07:43:06 nisimura Exp $ */ 2 3 #ifndef __IBUSVAR_H 4 #define __IBUSVAR_H 5 6 /* 7 * function types for interrupt establish/diestablish 8 */ 9 struct ibus_attach_args; 10 typedef int (ibus_intr_establish_t) __P((void * cookie, int level, 11 int (*handler) __P((intr_arg_t)), intr_arg_t arg)); 12 typedef int (ibus_intr_disestablish_t) __P((struct ibus_attach_args *)); 13 14 15 /* 16 * Arguments used to attach a ibus "device" to its parent 17 */ 18 struct ibus_dev_attach_args { 19 const char *ibd_busname; /* XXX should be common */ 20 #ifdef notyet 21 bus_space_tag_t iba_memt; 22 #endif 23 ibus_intr_establish_t (*ibd_establish); 24 ibus_intr_disestablish_t (*ibd_disestablish); 25 int ibd_ndevs; 26 struct ibus_attach_args *ibd_devs; 27 }; 28 29 /* 30 * Arguments used to attach devices to an ibus 31 */ 32 struct ibus_attach_args { 33 char *ia_name; /* Device name. */ 34 int ia_cookie; /* Device slot (table entry). */ 35 u_int32_t ia_addr; /* Device address. */ 36 }; 37 38 39 /* 40 * interrrupt estalish functions. 41 * These call up to system-specific code to 42 * recompute spl levels. 43 */ 44 void ibus_intr_establish __P((void * cookie, int level, 45 int (*handler) __P((intr_arg_t)), intr_arg_t arg)); 46 void ibus_intr_disestablish __P((struct ibus_attach_args *)); 47 int ibusprint __P((void *aux, const char *pnp)); 48 49 #endif /* __IBUSVAR_H */ 50