Home | History | Annotate | Line # | Download | only in include
eisa_machdep.h revision 1.10.16.1
      1  1.10.16.1    rmind /* $NetBSD: eisa_machdep.h,v 1.10.16.1 2014/05/18 17:44:53 rmind 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.10     matt 	void	(*ec_attach_hook)(device_t, device_t,
     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.10.16.1    rmind 	const char *(*ec_intr_string)(void *, eisa_intr_handle_t, char *,
     44  1.10.16.1    rmind 		    size_t);
     45        1.5      cgd 	const struct evcnt *(*ec_intr_evcnt)(void *, eisa_intr_handle_t);
     46        1.4      cgd 	void	*(*ec_intr_establish)(void *, eisa_intr_handle_t,
     47        1.4      cgd 		    int, int, int (*)(void *), void *);
     48        1.4      cgd 	void	(*ec_intr_disestablish)(void *, void *);
     49        1.3      cgd };
     50        1.3      cgd 
     51        1.3      cgd /*
     52        1.3      cgd  * Functions provided to machine-independent EISA code.
     53        1.3      cgd  */
     54        1.3      cgd #define	eisa_attach_hook(p, s, a)					\
     55        1.3      cgd     (*(a)->eba_ec->ec_attach_hook)((p), (s), (a))
     56        1.3      cgd #define	eisa_maxslots(c)						\
     57        1.3      cgd     (*(c)->ec_maxslots)((c)->ec_v)
     58        1.3      cgd #define	eisa_intr_map(c, i, hp)						\
     59        1.3      cgd     (*(c)->ec_intr_map)((c)->ec_v, (i), (hp))
     60  1.10.16.1    rmind #define	eisa_intr_string(c, h, buf, len)				\
     61  1.10.16.1    rmind     (*(c)->ec_intr_string)((c)->ec_v, (h), (buf), (len))
     62        1.5      cgd #define	eisa_intr_evcnt(c, h)						\
     63        1.5      cgd     (*(c)->ec_intr_evcnt)((c)->ec_v, (h))
     64        1.3      cgd #define	eisa_intr_establish(c, h, t, l, f, a)				\
     65        1.3      cgd     (*(c)->ec_intr_establish)((c)->ec_v, (h), (t), (l), (f), (a))
     66        1.3      cgd #define	eisa_intr_disestablish(c, h)					\
     67        1.3      cgd     (*(c)->ec_intr_disestablish)((c)->ec_v, (h))
     68        1.7  thorpej 
     69        1.7  thorpej int	eisa_conf_read_mem(eisa_chipset_tag_t, int, int, int,
     70        1.7  thorpej 	    struct eisa_cfg_mem *);
     71        1.7  thorpej int	eisa_conf_read_irq(eisa_chipset_tag_t, int, int, int,
     72        1.7  thorpej 	    struct eisa_cfg_irq *);
     73        1.7  thorpej int	eisa_conf_read_dma(eisa_chipset_tag_t, int, int, int,
     74        1.7  thorpej 	    struct eisa_cfg_dma *);
     75        1.7  thorpej int	eisa_conf_read_io(eisa_chipset_tag_t, int, int, int,
     76        1.7  thorpej 	    struct eisa_cfg_io *);
     77        1.6  thorpej 
     78        1.6  thorpej /*
     79        1.6  thorpej  * Internal functions, NOT TO BE USED BY MACHINE-INDEPENDENT CODE!
     80        1.6  thorpej  */
     81        1.6  thorpej 
     82        1.8  tsutsui void	eisa_init(eisa_chipset_tag_t);
     83        1.6  thorpej 
     84        1.6  thorpej extern bus_size_t eisa_config_stride;
     85        1.6  thorpej extern paddr_t eisa_config_addr;
     86