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