Home | History | Annotate | Line # | Download | only in include
eisa_machdep.h revision 1.6
      1  1.6  thorpej /* $NetBSD: eisa_machdep.h,v 1.6 2000/07/29 23:18:47 thorpej Exp $ */
      2  1.3      cgd 
      3  1.3      cgd /*
      4  1.3      cgd  * Copyright (c) 1996 Carnegie-Mellon University.
      5  1.3      cgd  * All rights reserved.
      6  1.3      cgd  *
      7  1.3      cgd  * Author: Chris G. Demetriou
      8  1.3      cgd  *
      9  1.3      cgd  * Permission to use, copy, modify and distribute this software and
     10  1.3      cgd  * its documentation is hereby granted, provided that both the copyright
     11  1.3      cgd  * notice and this permission notice appear in all copies of the
     12  1.3      cgd  * software, derivative works or modified versions, and any portions
     13  1.3      cgd  * thereof, and that both notices appear in supporting documentation.
     14  1.3      cgd  *
     15  1.3      cgd  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  1.3      cgd  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  1.3      cgd  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  1.3      cgd  *
     19  1.3      cgd  * Carnegie Mellon requests users of this software to return to
     20  1.3      cgd  *
     21  1.3      cgd  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  1.3      cgd  *  School of Computer Science
     23  1.3      cgd  *  Carnegie Mellon University
     24  1.3      cgd  *  Pittsburgh PA 15213-3890
     25  1.3      cgd  *
     26  1.3      cgd  * any improvements or extensions that they make and grant Carnegie the
     27  1.3      cgd  * rights to redistribute these changes.
     28  1.3      cgd  */
     29  1.3      cgd 
     30  1.3      cgd /*
     31  1.3      cgd  * Types provided to machine-independent EISA code.
     32  1.3      cgd  */
     33  1.3      cgd typedef struct alpha_eisa_chipset *eisa_chipset_tag_t;
     34  1.3      cgd typedef int eisa_intr_handle_t;
     35  1.3      cgd 
     36  1.3      cgd struct alpha_eisa_chipset {
     37  1.3      cgd 	void	*ec_v;
     38  1.3      cgd 
     39  1.4      cgd 	void	(*ec_attach_hook)(struct device *, struct device *,
     40  1.4      cgd 		    struct eisabus_attach_args *);
     41  1.4      cgd 	int	(*ec_maxslots)(void *);
     42  1.4      cgd 	int	(*ec_intr_map)(void *, u_int, eisa_intr_handle_t *);
     43  1.4      cgd 	const char *(*ec_intr_string)(void *, eisa_intr_handle_t);
     44  1.5      cgd 	const struct evcnt *(*ec_intr_evcnt)(void *, eisa_intr_handle_t);
     45  1.4      cgd 	void	*(*ec_intr_establish)(void *, eisa_intr_handle_t,
     46  1.4      cgd 		    int, int, int (*)(void *), void *);
     47  1.4      cgd 	void	(*ec_intr_disestablish)(void *, void *);
     48  1.3      cgd };
     49  1.3      cgd 
     50  1.3      cgd /*
     51  1.3      cgd  * Functions provided to machine-independent EISA code.
     52  1.3      cgd  */
     53  1.3      cgd #define	eisa_attach_hook(p, s, a)					\
     54  1.3      cgd     (*(a)->eba_ec->ec_attach_hook)((p), (s), (a))
     55  1.3      cgd #define	eisa_maxslots(c)						\
     56  1.3      cgd     (*(c)->ec_maxslots)((c)->ec_v)
     57  1.3      cgd #define	eisa_intr_map(c, i, hp)						\
     58  1.3      cgd     (*(c)->ec_intr_map)((c)->ec_v, (i), (hp))
     59  1.3      cgd #define	eisa_intr_string(c, h)						\
     60  1.3      cgd     (*(c)->ec_intr_string)((c)->ec_v, (h))
     61  1.5      cgd #define	eisa_intr_evcnt(c, h)						\
     62  1.5      cgd     (*(c)->ec_intr_evcnt)((c)->ec_v, (h))
     63  1.3      cgd #define	eisa_intr_establish(c, h, t, l, f, a)				\
     64  1.3      cgd     (*(c)->ec_intr_establish)((c)->ec_v, (h), (t), (l), (f), (a))
     65  1.3      cgd #define	eisa_intr_disestablish(c, h)					\
     66  1.3      cgd     (*(c)->ec_intr_disestablish)((c)->ec_v, (h))
     67  1.6  thorpej 
     68  1.6  thorpej /*
     69  1.6  thorpej  * Internal functions, NOT TO BE USED BY MACHINE-INDEPENDENT CODE!
     70  1.6  thorpej  */
     71  1.6  thorpej 
     72  1.6  thorpej void	eisa_init(void);
     73  1.6  thorpej 
     74  1.6  thorpej extern bus_size_t eisa_config_stride;
     75  1.6  thorpej extern paddr_t eisa_config_addr;
     76