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