Home | History | Annotate | Line # | Download | only in include
eisa_machdep.h revision 1.5.2.1
      1  1.5.2.1  thorpej /* $NetBSD: eisa_machdep.h,v 1.5.2.1 2000/08/11 18:00:06 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.5.2.1  thorpej 
     68  1.5.2.1  thorpej int	eisa_conf_read_mem(eisa_chipset_tag_t, int, int, int,
     69  1.5.2.1  thorpej 	    struct eisa_cfg_mem *);
     70  1.5.2.1  thorpej int	eisa_conf_read_irq(eisa_chipset_tag_t, int, int, int,
     71  1.5.2.1  thorpej 	    struct eisa_cfg_irq *);
     72  1.5.2.1  thorpej int	eisa_conf_read_dma(eisa_chipset_tag_t, int, int, int,
     73  1.5.2.1  thorpej 	    struct eisa_cfg_dma *);
     74  1.5.2.1  thorpej int	eisa_conf_read_io(eisa_chipset_tag_t, int, int, int,
     75  1.5.2.1  thorpej 	    struct eisa_cfg_io *);
     76  1.5.2.1  thorpej 
     77  1.5.2.1  thorpej /*
     78  1.5.2.1  thorpej  * Internal functions, NOT TO BE USED BY MACHINE-INDEPENDENT CODE!
     79  1.5.2.1  thorpej  */
     80  1.5.2.1  thorpej 
     81  1.5.2.1  thorpej void	eisa_init(void);
     82  1.5.2.1  thorpej 
     83  1.5.2.1  thorpej extern bus_size_t eisa_config_stride;
     84  1.5.2.1  thorpej extern paddr_t eisa_config_addr;
     85