Home | History | Annotate | Line # | Download | only in dev
vme_pccvar.h revision 1.2
      1 /*	$NetBSD: vme_pccvar.h,v 1.2 2000/03/18 22:33:04 scw Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 1999 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Steve C. Woodford.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     13  * 1. Redistributions of source code must retain the above copyright
     14  *    notice, this list of conditions and the following disclaimer.
     15  * 2. Redistributions in binary form must reproduce the above copyright
     16  *    notice, this list of conditions and the following disclaimer in the
     17  *    documentation and/or other materials provided with the distribution.
     18  * 3. All advertising materials mentioning features or use of this software
     19  *    must display the following acknowledgement:
     20  *        This product includes software developed by the NetBSD
     21  *        Foundation, Inc. and its contributors.
     22  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  *    contributors may be used to endorse or promote products derived
     24  *    from this software without specific prior written permission.
     25  *
     26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  * POSSIBILITY OF SUCH DAMAGE.
     37  */
     38 
     39 #ifndef _MVME68K_VME_PCCVAR_H
     40 #define _MVME68K_VME_PCCVAR_H
     41 
     42 
     43 struct vme_pcc_softc {
     44 	struct device		sc_dev;
     45 	bus_space_tag_t		sc_bust;
     46 	bus_space_handle_t	sc_bush;
     47 	bus_dma_tag_t		sc_dmat;
     48 	bus_space_tag_t		sc_vmet;
     49 	struct vme_chipset_tag	sc_vct;
     50 	u_long			sc_irqref[8];
     51 };
     52 
     53 
     54 struct vme_pcc_mapresc_t {
     55 	bus_space_handle_t	pm_handle;
     56 	bus_addr_t		pm_addr;
     57 	bus_size_t		pm_size;
     58 	vme_am_t		pm_am;
     59 	vme_datasize_t		pm_datasize;
     60 };
     61 
     62 
     63 int _vme_pcc_map __P((void *, vme_addr_t, vme_size_t, vme_am_t, vme_datasize_t,
     64     vme_swap_t, bus_space_tag_t *, bus_space_handle_t *, vme_mapresc_t *));
     65 
     66 void _vme_pcc_unmap __P((void *, vme_mapresc_t));
     67 
     68 int _vme_pcc_probe __P((void *, vme_addr_t, vme_size_t, vme_am_t,vme_datasize_t,
     69     int (*)(void *, bus_space_tag_t, bus_space_handle_t), void *));
     70 
     71 int _vme_pcc_intmap __P((void *, int, int, vme_intr_handle_t *));
     72 
     73 void *_vme_pcc_intr_establish __P((void *, vme_intr_handle_t, int,
     74     int (*)(void *), void *));
     75 
     76 void _vme_pcc_intr_disestablish __P((void *, vme_intr_handle_t));
     77 
     78 int _vme_pcc_dmamap_create __P((void *, vme_size_t, vme_am_t, vme_datasize_t,
     79     vme_swap_t, int, vme_size_t, vme_addr_t, int, bus_dmamap_t *));
     80 
     81 void _vme_pcc_dmamap_destroy __P((void *, bus_dmamap_t));
     82 
     83 int _vme_pcc_dmamem_alloc __P((void *, vme_size_t, vme_am_t, vme_datasize_t,
     84     vme_swap_t, bus_dma_segment_t *, int, int *, int));
     85 
     86 void _vme_pcc_dmamem_free __P((void *, bus_dma_segment_t *, int));
     87 
     88 #endif /* __MVME68K_VME_PCCVAR_H */
     89