Home | History | Annotate | Line # | Download | only in include
      1  1.13   thorpej /* $NetBSD: eisa_machdep.h,v 1.13 2021/09/25 20:16:17 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.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.11  christos 	const char *(*ec_intr_string)(void *, eisa_intr_handle_t, char *,
     44  1.11  christos 		    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.13   thorpej void		eisa_attach_hook(device_t, device_t,
     55  1.13   thorpej 		    struct eisabus_attach_args *);
     56  1.13   thorpej int		eisa_maxslots(eisa_chipset_tag_t);
     57  1.13   thorpej int		eisa_intr_map(eisa_chipset_tag_t, u_int, eisa_intr_handle_t *);
     58  1.13   thorpej const char *	eisa_intr_string(eisa_chipset_tag_t, eisa_intr_handle_t,
     59  1.13   thorpej 		    char *, size_t);
     60  1.13   thorpej const struct evcnt *eisa_intr_evcnt(eisa_chipset_tag_t, eisa_intr_handle_t);
     61  1.13   thorpej void *		eisa_intr_establish(eisa_chipset_tag_t, eisa_intr_handle_t,
     62  1.13   thorpej 		    int, int, int (*)(void *), void *);
     63  1.13   thorpej void		eisa_intr_disestablish(eisa_chipset_tag_t, void *);
     64  1.13   thorpej 
     65  1.13   thorpej int		eisa_conf_read_mem(eisa_chipset_tag_t, int, int, int,
     66  1.13   thorpej 		    struct eisa_cfg_mem *);
     67  1.13   thorpej int		eisa_conf_read_irq(eisa_chipset_tag_t, int, int, int,
     68  1.13   thorpej 		    struct eisa_cfg_irq *);
     69  1.13   thorpej int		eisa_conf_read_dma(eisa_chipset_tag_t, int, int, int,
     70  1.13   thorpej 		    struct eisa_cfg_dma *);
     71  1.13   thorpej int		eisa_conf_read_io(eisa_chipset_tag_t, int, int, int,
     72  1.13   thorpej 		    struct eisa_cfg_io *);
     73   1.6   thorpej 
     74   1.6   thorpej /*
     75   1.6   thorpej  * Internal functions, NOT TO BE USED BY MACHINE-INDEPENDENT CODE!
     76   1.6   thorpej  */
     77   1.6   thorpej 
     78   1.8   tsutsui void	eisa_init(eisa_chipset_tag_t);
     79   1.6   thorpej 
     80   1.6   thorpej extern bus_size_t eisa_config_stride;
     81   1.6   thorpej extern paddr_t eisa_config_addr;
     82