Home | History | Annotate | Line # | Download | only in include
isa_machdep.h revision 1.5
      1  1.5      cgd /* $NetBSD: isa_machdep.h,v 1.5 2000/06/01 00:04:50 cgd Exp $ */
      2  1.1      cgd 
      3  1.1      cgd /*
      4  1.3      cgd  * Copyright (c) 1996 Carnegie-Mellon University.
      5  1.1      cgd  * All rights reserved.
      6  1.1      cgd  *
      7  1.1      cgd  * Author: Chris G. Demetriou
      8  1.1      cgd  *
      9  1.1      cgd  * Permission to use, copy, modify and distribute this software and
     10  1.1      cgd  * its documentation is hereby granted, provided that both the copyright
     11  1.1      cgd  * notice and this permission notice appear in all copies of the
     12  1.1      cgd  * software, derivative works or modified versions, and any portions
     13  1.1      cgd  * thereof, and that both notices appear in supporting documentation.
     14  1.1      cgd  *
     15  1.1      cgd  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  1.1      cgd  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  1.1      cgd  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  1.1      cgd  *
     19  1.1      cgd  * Carnegie Mellon requests users of this software to return to
     20  1.1      cgd  *
     21  1.1      cgd  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  1.1      cgd  *  School of Computer Science
     23  1.1      cgd  *  Carnegie Mellon University
     24  1.1      cgd  *  Pittsburgh PA 15213-3890
     25  1.1      cgd  *
     26  1.1      cgd  * any improvements or extensions that they make and grant Carnegie the
     27  1.1      cgd  * rights to redistribute these changes.
     28  1.1      cgd  */
     29  1.1      cgd 
     30  1.3      cgd #include <dev/isa/isadmavar.h>
     31  1.3      cgd 
     32  1.3      cgd /*
     33  1.3      cgd  * Types provided to machine-independent ISA code.
     34  1.3      cgd  */
     35  1.3      cgd typedef struct alpha_isa_chipset *isa_chipset_tag_t;
     36  1.3      cgd 
     37  1.3      cgd struct alpha_isa_chipset {
     38  1.3      cgd 	void	*ic_v;
     39  1.3      cgd 
     40  1.3      cgd 	struct isa_dma_state ic_dmastate;
     41  1.3      cgd 
     42  1.5      cgd 	void	(*ic_attach_hook)(struct device *, struct device *,
     43  1.5      cgd 		    struct isabus_attach_args *);
     44  1.5      cgd 	void	*(*ic_intr_establish)(void *, int, int, int,
     45  1.5      cgd 		    int (*)(void *), void *);
     46  1.5      cgd 	void	(*ic_intr_disestablish)(void *, void *);
     47  1.5      cgd 	int	(*ic_intr_alloc)(void *, int, int, int *);
     48  1.3      cgd };
     49  1.3      cgd 
     50  1.3      cgd 
     51  1.3      cgd /*
     52  1.3      cgd  * Functions provided to machine-independent ISA code.
     53  1.3      cgd  */
     54  1.3      cgd #define	isa_attach_hook(p, s, a)					\
     55  1.3      cgd     (*(a)->iba_ic->ic_attach_hook)((p), (s), (a))
     56  1.3      cgd #define	isa_intr_establish(c, i, t, l, f, a)				\
     57  1.3      cgd     (*(c)->ic_intr_establish)((c)->ic_v, (i), (t), (l), (f), (a))
     58  1.3      cgd #define	isa_intr_disestablish(c, h)					\
     59  1.3      cgd     (*(c)->ic_intr_disestablish)((c)->ic_v, (h))
     60  1.3      cgd #define	isa_intr_alloc(c, m, t, i)					\
     61  1.3      cgd     (*(c)->ic_intr_alloc)((c)->ic_v, (m), (t), (i))
     62  1.3      cgd 
     63  1.3      cgd #define	isa_dmainit(ic, bst, dmat, d)					\
     64  1.3      cgd 	_isa_dmainit(&(ic)->ic_dmastate, (bst), (dmat), (d))
     65  1.3      cgd #define	isa_dmacascade(ic, c)						\
     66  1.3      cgd 	_isa_dmacascade(&(ic)->ic_dmastate, (c))
     67  1.4  thorpej #define	isa_dmamaxsize(ic, c)						\
     68  1.4  thorpej 	_isa_dmamaxsize(&(ic)->ic_dmastate, (c))
     69  1.3      cgd #define	isa_dmamap_create(ic, c, s, f)					\
     70  1.3      cgd 	_isa_dmamap_create(&(ic)->ic_dmastate, (c), (s), (f))
     71  1.3      cgd #define	isa_dmamap_destroy(ic, c)					\
     72  1.3      cgd 	_isa_dmamap_destroy(&(ic)->ic_dmastate, (c))
     73  1.3      cgd #define	isa_dmastart(ic, c, a, n, p, f, bf)				\
     74  1.3      cgd 	_isa_dmastart(&(ic)->ic_dmastate, (c), (a), (n), (p), (f), (bf))
     75  1.3      cgd #define	isa_dmaabort(ic, c)						\
     76  1.3      cgd 	_isa_dmaabort(&(ic)->ic_dmastate, (c))
     77  1.3      cgd #define	isa_dmacount(ic, c)						\
     78  1.3      cgd 	_isa_dmacount(&(ic)->ic_dmastate, (c))
     79  1.3      cgd #define	isa_dmafinished(ic, c)						\
     80  1.3      cgd 	_isa_dmafinished(&(ic)->ic_dmastate, (c))
     81  1.3      cgd #define	isa_dmadone(ic, c)						\
     82  1.3      cgd 	_isa_dmadone(&(ic)->ic_dmastate, (c))
     83  1.3      cgd #define	isa_dmafreeze(ic)						\
     84  1.3      cgd 	_isa_dmafreeze(&(ic)->ic_dmastate)
     85  1.3      cgd #define	isa_dmathaw(ic)							\
     86  1.3      cgd 	_isa_dmathaw(&(ic)->ic_dmastate)
     87  1.3      cgd #define	isa_dmamem_alloc(ic, c, s, ap, f)				\
     88  1.3      cgd 	_isa_dmamem_alloc(&(ic)->ic_dmastate, (c), (s), (ap), (f))
     89  1.3      cgd #define	isa_dmamem_free(ic, c, a, s)					\
     90  1.3      cgd 	_isa_dmamem_free(&(ic)->ic_dmastate, (c), (a), (s))
     91  1.3      cgd #define	isa_dmamem_map(ic, c, a, s, kp, f)				\
     92  1.3      cgd 	_isa_dmamem_map(&(ic)->ic_dmastate, (c), (a), (s), (kp), (f))
     93  1.3      cgd #define	isa_dmamem_unmap(ic, c, k, s)					\
     94  1.3      cgd 	_isa_dmamem_unmap(&(ic)->ic_dmastate, (c), (k), (s))
     95  1.3      cgd #define	isa_dmamem_mmap(ic, c, a, s, o, p, f)				\
     96  1.3      cgd 	_isa_dmamem_mmap(&(ic)->ic_dmastate, (c), (a), (s), (o), (p), (f))
     97  1.3      cgd #define	isa_drq_isfree(ic, c)						\
     98  1.3      cgd 	_isa_drq_isfree(&(ic)->ic_dmastate, (c))
     99  1.3      cgd #define	isa_malloc(ic, c, s, p, f)					\
    100  1.3      cgd 	_isa_malloc(&(ic)->ic_dmastate, (c), (s), (p), (f))
    101  1.3      cgd #define	isa_free(a, p)							\
    102  1.3      cgd 	_isa_free((a), (p))
    103  1.3      cgd #define	isa_mappage(m, o, p)						\
    104  1.3      cgd 	_isa_mappage((m), (o), (p))
    105  1.3      cgd 
    106  1.3      cgd /*
    107  1.3      cgd  * alpha-specific ISA functions.
    108  1.3      cgd  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
    109  1.3      cgd  */
    110  1.5      cgd int isa_display_console(bus_space_tag_t, bus_space_tag_t);
    111  1.3      cgd 
    112  1.5      cgd void isabeep(int, int);
    113