Home | History | Annotate | Line # | Download | only in include
isa_machdep.h revision 1.5.10.1
      1  1.5.10.1     fvdl /*	$NetBSD: isa_machdep.h,v 1.5.10.1 1999/11/15 00:37:30 fvdl Exp $	*/
      2       1.3  thorpej 
      3       1.3  thorpej /*-
      4       1.3  thorpej  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5       1.3  thorpej  * All rights reserved.
      6       1.3  thorpej  *
      7       1.3  thorpej  * This code is derived from software contributed to The NetBSD Foundation
      8       1.3  thorpej  * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
      9       1.3  thorpej  * NASA Ames Research Center.
     10       1.3  thorpej  *
     11       1.3  thorpej  * Redistribution and use in source and binary forms, with or without
     12       1.3  thorpej  * modification, are permitted provided that the following conditions
     13       1.3  thorpej  * are met:
     14       1.3  thorpej  * 1. Redistributions of source code must retain the above copyright
     15       1.3  thorpej  *    notice, this list of conditions and the following disclaimer.
     16       1.3  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     17       1.3  thorpej  *    notice, this list of conditions and the following disclaimer in the
     18       1.3  thorpej  *    documentation and/or other materials provided with the distribution.
     19       1.3  thorpej  * 3. All advertising materials mentioning features or use of this software
     20       1.3  thorpej  *    must display the following acknowledgement:
     21       1.3  thorpej  *	This product includes software developed by the NetBSD
     22       1.3  thorpej  *	Foundation, Inc. and its contributors.
     23       1.3  thorpej  * 4. Neither the name of The NetBSD Foundation nor the names of its
     24       1.3  thorpej  *    contributors may be used to endorse or promote products derived
     25       1.3  thorpej  *    from this software without specific prior written permission.
     26       1.3  thorpej  *
     27       1.3  thorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     28       1.3  thorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     29       1.3  thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     30       1.3  thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     31       1.3  thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     32       1.3  thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     33       1.3  thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     34       1.3  thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     35       1.3  thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     36       1.3  thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     37       1.3  thorpej  * POSSIBILITY OF SUCH DAMAGE.
     38       1.3  thorpej  */
     39       1.1      leo 
     40       1.1      leo /*
     41       1.1      leo  * Copyright (c) 1997 Leo Weppelman.  All rights reserved.
     42       1.1      leo  *
     43       1.1      leo  * Redistribution and use in source and binary forms, with or without
     44       1.1      leo  * modification, are permitted provided that the following conditions
     45       1.1      leo  * are met:
     46       1.1      leo  * 1. Redistributions of source code must retain the above copyright
     47       1.1      leo  *    notice, this list of conditions and the following disclaimer.
     48       1.1      leo  * 2. Redistributions in binary form must reproduce the above copyright
     49       1.1      leo  *    notice, this list of conditions and the following disclaimer in the
     50       1.1      leo  *    documentation and/or other materials provided with the distribution.
     51       1.1      leo  * 3. All advertising materials mentioning features or use of this software
     52       1.1      leo  *    must display the following acknowledgement:
     53       1.1      leo  *	This product includes software developed by Leo Weppelman.
     54       1.1      leo  * 4. The name of the author may not be used to endorse or promote products
     55       1.1      leo  *    derived from this software without specific prior written permission.
     56       1.1      leo  *
     57       1.1      leo  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     58       1.1      leo  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     59       1.1      leo  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     60       1.1      leo  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     61       1.1      leo  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     62       1.1      leo  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     63       1.1      leo  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     64       1.1      leo  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     65       1.1      leo  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     66       1.1      leo  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     67       1.1      leo  */
     68       1.1      leo 
     69       1.1      leo #ifndef _ATARI_ISA_MACHDEP_H_
     70       1.1      leo #define _ATARI_ISA_MACHDEP_H_
     71       1.1      leo 
     72       1.3  thorpej #include <machine/bus.h>
     73       1.3  thorpej #include <dev/isa/isadmavar.h>
     74       1.1      leo #include <atari/atari/intr.h>
     75       1.1      leo 
     76       1.1      leo #define	ISA_IOSTART	0xfff30000	/* XXX: Range with byte frobbing */
     77       1.1      leo #define	ISA_MEMSTART	0xff000000	/* XXX: Hades only	*/
     78       1.1      leo 
     79       1.3  thorpej struct atari_isa_chipset {
     80       1.3  thorpej 	struct isa_dma_state ic_dmastate;
     81       1.3  thorpej };
     82       1.3  thorpej 
     83       1.3  thorpej typedef struct atari_isa_chipset *isa_chipset_tag_t;
     84       1.1      leo 
     85       1.1      leo typedef struct	{
     86       1.1      leo 	int		slot;	/* 1/2, determines interrupt line	*/
     87       1.1      leo 	int		ipl;	/* ipl requested			*/
     88       1.2      leo 	int		(*ifunc) __P((void *));	/* function to call	*/
     89       1.1      leo 	void		*iarg;	/* argument for 'ifunc'			*/
     90       1.1      leo 	struct intrhand	*ihand;	/* save this for disestablishing	*/
     91       1.1      leo } isa_intr_info_t;
     92       1.1      leo 
     93       1.1      leo /*
     94       1.1      leo  * Functions provided to machine-independent ISA code.
     95       1.1      leo  */
     96       1.1      leo void	isa_attach_hook __P((struct device *, struct device *,
     97       1.1      leo 	    struct isabus_attach_args *));
     98  1.5.10.1     fvdl int	isa_intr_alloc __P((isa_chipset_tag_t, int, int, int *));
     99       1.1      leo void	*isa_intr_establish __P((isa_chipset_tag_t ic, int irq, int type,
    100       1.2      leo 	    int level, int (*)(void *), void *ih_arg));
    101       1.1      leo void	isa_intr_disestablish __P((isa_chipset_tag_t ic, void *handler));
    102       1.3  thorpej 
    103       1.3  thorpej #define	isa_dmainit(ic, bst, dmat, d)					\
    104       1.3  thorpej 	_isa_dmainit(&(ic)->ic_dmastate, (bst), (dmat), (d))
    105       1.3  thorpej #define	isa_dmacascade(ic, c)						\
    106       1.3  thorpej 	_isa_dmacascade(&(ic)->ic_dmastate, (c))
    107       1.3  thorpej #define	isa_dmamap_create(ic, c, s, f)					\
    108       1.3  thorpej 	_isa_dmamap_create(&(ic)->ic_dmastate, (c), (s), (f))
    109       1.3  thorpej #define	isa_dmamap_destroy(ic, c)					\
    110       1.3  thorpej 	_isa_dmamap_destroy(&(ic)->ic_dmastate, (c))
    111       1.3  thorpej #define	isa_dmastart(ic, c, a, n, p, f, bf)				\
    112       1.3  thorpej 	_isa_dmastart(&(ic)->ic_dmastate, (c), (a), (n), (p), (f), (bf))
    113       1.3  thorpej #define	isa_dmaabort(ic, c)						\
    114       1.3  thorpej 	_isa_dmaabort(&(ic)->ic_dmastate, (c))
    115       1.3  thorpej #define	isa_dmacount(ic, c)						\
    116       1.3  thorpej 	_isa_dmacount(&(ic)->ic_dmastate, (c))
    117       1.3  thorpej #define	isa_dmafinished(ic, c)						\
    118       1.3  thorpej 	_isa_dmafinished(&(ic)->ic_dmastate, (c))
    119       1.3  thorpej #define	isa_dmadone(ic, c)						\
    120       1.3  thorpej 	_isa_dmadone(&(ic)->ic_dmastate, (c))
    121       1.4  thorpej #define	isa_dmafreeze(ic)						\
    122       1.4  thorpej 	_isa_dmafreeze(&(ic)->ic_dmastate)
    123       1.4  thorpej #define	isa_dmathaw(ic)							\
    124       1.4  thorpej 	_isa_dmathaw(&(ic)->ic_dmastate)
    125       1.3  thorpej #define	isa_dmamem_alloc(ic, c, s, ap, f)				\
    126       1.3  thorpej 	_isa_dmamem_alloc(&(ic)->ic_dmastate, (c), (s), (ap), (f))
    127       1.3  thorpej #define	isa_dmamem_free(ic, c, a, s)					\
    128       1.3  thorpej 	_isa_dmamem_free(&(ic)->ic_dmastate, (c), (a), (s))
    129       1.3  thorpej #define	isa_dmamem_map(ic, c, a, s, kp, f)				\
    130       1.3  thorpej 	_isa_dmamem_map(&(ic)->ic_dmastate, (c), (a), (s), (kp), (f))
    131       1.3  thorpej #define	isa_dmamem_unmap(ic, c, k, s)					\
    132       1.3  thorpej 	_isa_dmamem_unmap(&(ic)->ic_dmastate, (c), (k), (s))
    133       1.3  thorpej #define	isa_dmamem_mmap(ic, c, a, s, o, p, f)				\
    134       1.3  thorpej 	_isa_dmamem_mmap(&(ic)->ic_dmastate, (c), (a), (s), (o), (p), (f))
    135       1.3  thorpej #define	isa_drq_isfree(ic, c)						\
    136       1.3  thorpej 	_isa_drq_isfree(&(ic)->ic_dmastate, (c))
    137       1.3  thorpej #define	isa_malloc(ic, c, s, p, f)					\
    138       1.3  thorpej 	_isa_malloc(&(ic)->ic_dmastate, (c), (s), (p), (f))
    139       1.3  thorpej #define	isa_free(a, p)							\
    140       1.3  thorpej 	_isa_free((a), (p))
    141       1.3  thorpej #define	isa_mappage(m, o, p)						\
    142       1.3  thorpej 	_isa_mappage((m), (o), (p))
    143       1.1      leo 
    144       1.1      leo #endif /* _ATARI_ISA_MACHDEP_H_ */
    145