Home | History | Annotate | Line # | Download | only in isa
esp_isavar.h revision 1.2.38.1
      1  1.2.38.1     kent /*	$NetBSD: esp_isavar.h,v 1.2.38.1 2005/04/29 11:28:54 kent Exp $	*/
      2       1.1  mycroft 
      3       1.1  mycroft /*
      4       1.1  mycroft  * Copyright (c) 1997 Allen Briggs.
      5       1.1  mycroft  * All rights reserved.
      6       1.1  mycroft  *
      7       1.1  mycroft  * Redistribution and use in source and binary forms, with or without
      8       1.1  mycroft  * modification, are permitted provided that the following conditions
      9       1.1  mycroft  * are met:
     10       1.1  mycroft  * 1. Redistributions of source code must retain the above copyright
     11       1.1  mycroft  *    notice, this list of conditions and the following disclaimer.
     12       1.1  mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     13       1.1  mycroft  *    notice, this list of conditions and the following disclaimer in the
     14       1.1  mycroft  *    documentation and/or other materials provided with the distribution.
     15       1.1  mycroft  * 3. All advertising materials mentioning features or use of this software
     16       1.1  mycroft  *    must display the following acknowledgement:
     17       1.1  mycroft  *	This product includes software developed by Peter Galbavy.
     18       1.1  mycroft  * 4. The name of the author may not be used to endorse or promote products
     19       1.1  mycroft  *    derived from this software without specific prior written permission.
     20       1.1  mycroft  *
     21       1.1  mycroft  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     22       1.1  mycroft  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     23       1.1  mycroft  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     24       1.1  mycroft  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     25       1.1  mycroft  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     26       1.1  mycroft  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27       1.1  mycroft  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28       1.1  mycroft  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29       1.1  mycroft  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     30       1.1  mycroft  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31       1.1  mycroft  */
     32       1.1  mycroft 
     33       1.1  mycroft /*
     34       1.1  mycroft  * Copyright (c) 1997 Eric S. Hvozda (hvozda (at) netcom.com)
     35       1.1  mycroft  * All rights reserved.
     36       1.1  mycroft  *
     37       1.1  mycroft  * Redistribution and use in source and binary forms, with or without
     38       1.1  mycroft  * modification, are permitted provided that the following conditions
     39       1.1  mycroft  * are met:
     40       1.1  mycroft  * 1. Redistributions of source code must retain the above copyright
     41       1.1  mycroft  *    notice, this list of conditions and the following disclaimer.
     42       1.1  mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     43       1.1  mycroft  *    notice, this list of conditions and the following disclaimer in the
     44       1.1  mycroft  *    documentation and/or other materials provided with the distribution.
     45       1.1  mycroft  * 3. All advertising materials mentioning features or use of this software
     46       1.1  mycroft  *    must display the following acknowledgement:
     47       1.1  mycroft  *      This product includes software developed by Eric S. Hvozda.
     48       1.1  mycroft  * 4. The name of Eric S. Hvozda may not be used to endorse or promote products
     49       1.1  mycroft  *    derived from this software without specific prior written permission.
     50       1.1  mycroft  *
     51       1.1  mycroft  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     52       1.1  mycroft  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     53       1.1  mycroft  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     54       1.1  mycroft  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     55       1.1  mycroft  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     56       1.1  mycroft  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     57       1.1  mycroft  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     58       1.1  mycroft  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     59       1.1  mycroft  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     60       1.1  mycroft  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     61       1.1  mycroft  */
     62       1.1  mycroft 
     63       1.1  mycroft struct esp_isa_softc {
     64       1.1  mycroft 	struct ncr53c9x_softc	sc_ncr53c9x;	/* glue to MI code */
     65       1.1  mycroft 
     66       1.1  mycroft 	int		sc_active;		/* Pseudo-DMA state vars */
     67       1.1  mycroft 	int		sc_tc;
     68       1.1  mycroft 	int		sc_datain;
     69       1.1  mycroft 	size_t		sc_dmasize;
     70       1.1  mycroft 	size_t		sc_dmatrans;
     71       1.1  mycroft 	char		**sc_dmaaddr;
     72       1.1  mycroft 	size_t		*sc_pdmalen;
     73       1.1  mycroft 
     74       1.1  mycroft 	bus_space_tag_t sc_iot;
     75       1.1  mycroft 	bus_space_handle_t sc_ioh;
     76       1.1  mycroft 	void *sc_ih;
     77       1.1  mycroft 	int sc_irq;
     78       1.1  mycroft 	int sc_drq;
     79       1.1  mycroft 
     80       1.1  mycroft #ifdef ESP_DEBUG
     81       1.1  mycroft 	int sc_debug;
     82       1.1  mycroft #endif
     83       1.1  mycroft };
     84       1.1  mycroft 
     85       1.1  mycroft struct esp_isa_probe_data {
     86       1.1  mycroft 	int sc_irq;
     87       1.1  mycroft 	int sc_isncr;
     88       1.1  mycroft 	int sc_rev;
     89       1.1  mycroft 	int sc_isfast;
     90       1.1  mycroft 	int sc_msize;
     91       1.1  mycroft 	int sc_parity;
     92       1.1  mycroft 	int sc_sync;
     93       1.1  mycroft 	int sc_id;
     94       1.2  mycroft 	u_char sc_cfg4, sc_cfg5;
     95       1.1  mycroft };
     96       1.1  mycroft 
     97       1.1  mycroft #define ESP_ISA_IOSIZE  16
     98       1.1  mycroft 
     99  1.2.38.1     kent int	esp_isa_find(bus_space_tag_t, bus_space_handle_t,
    100  1.2.38.1     kent 	    struct esp_isa_probe_data *);
    101  1.2.38.1     kent void    esp_isa_init(struct esp_isa_softc *, struct esp_isa_probe_data *);
    102       1.1  mycroft 
    103       1.1  mycroft #ifdef ESP_DEBUG
    104       1.1  mycroft extern int esp_isa_debug;
    105       1.1  mycroft 
    106       1.1  mycroft #define ESP_SHOWTRAC    0x01
    107       1.1  mycroft #define ESP_SHOWREGS    0x02
    108       1.1  mycroft #define ESP_SHOWMISC    0x04
    109       1.1  mycroft 
    110       1.1  mycroft #define ESP_TRACE(str)  \
    111       1.1  mycroft         do {if (esp_isa_debug & ESP_SHOWTRAC) printf str;} while (0)
    112       1.1  mycroft #define ESP_REGS(str)  \
    113       1.1  mycroft         do {if (esp_isa_debug & ESP_SHOWREGS) printf str;} while (0)
    114       1.1  mycroft #define ESP_MISC(str)  \
    115       1.1  mycroft         do {if (esp_isa_debug & ESP_SHOWMISC) printf str;} while (0)
    116       1.1  mycroft #else
    117       1.1  mycroft #define ESP_TRACE(str)
    118       1.1  mycroft #define ESP_REGS(str)
    119       1.1  mycroft #define ESP_MISC(str)
    120       1.1  mycroft #endif
    121