uba_common.h revision 1.2 1 1.2 ragge /* $NetBSD: uba_common.h,v 1.2 1999/06/21 16:23:01 ragge Exp $ */
2 1.2 ragge /*-
3 1.2 ragge * Copyright (c) 1982, 1986 The Regents of the University of California.
4 1.1 ragge * All rights reserved.
5 1.2 ragge * (c) UNIX System Laboratories, Inc.
6 1.2 ragge * All or some portions of this file are derived from material licensed
7 1.2 ragge * to the University of California by American Telephone and Telegraph
8 1.2 ragge * Co. or Unix System Laboratories, Inc. and are reproduced herein with
9 1.2 ragge * the permission of UNIX System Laboratories, Inc.
10 1.1 ragge *
11 1.1 ragge * Redistribution and use in source and binary forms, with or without
12 1.1 ragge * modification, are permitted provided that the following conditions
13 1.1 ragge * are met:
14 1.1 ragge * 1. Redistributions of source code must retain the above copyright
15 1.1 ragge * notice, this list of conditions and the following disclaimer.
16 1.1 ragge * 2. Redistributions in binary form must reproduce the above copyright
17 1.1 ragge * notice, this list of conditions and the following disclaimer in the
18 1.1 ragge * documentation and/or other materials provided with the distribution.
19 1.1 ragge * 3. All advertising materials mentioning features or use of this software
20 1.1 ragge * must display the following acknowledgement:
21 1.2 ragge * This product includes software developed by the University of
22 1.2 ragge * California, Berkeley and its contributors.
23 1.2 ragge * 4. Neither the name of the University nor the names of its contributors
24 1.2 ragge * may be used to endorse or promote products derived from this software
25 1.2 ragge * without specific prior written permission.
26 1.2 ragge *
27 1.2 ragge * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 1.2 ragge * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 1.2 ragge * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 1.2 ragge * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 1.2 ragge * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 1.2 ragge * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 1.2 ragge * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 1.2 ragge * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 1.2 ragge * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 1.2 ragge * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 1.2 ragge * SUCH DAMAGE.
38 1.1 ragge *
39 1.2 ragge * @(#)ubareg.h 7.8 (Berkeley) 5/9/91
40 1.1 ragge */
41 1.1 ragge
42 1.1 ragge /*
43 1.1 ragge * VAX-specific parts of the Unibus softc.
44 1.1 ragge */
45 1.2 ragge struct uba_regs;
46 1.1 ragge
47 1.1 ragge struct uba_vsoftc {
48 1.1 ragge struct uba_softc uv_sc;/* Common vars from dev/qbus/ubavar.h */
49 1.1 ragge struct vax_bus_dma_tag uv_dmat;
50 1.1 ragge struct vax_sgmap uv_sgmap;
51 1.1 ragge int uv_size; /* Size of UBA addressable memory */
52 1.2 ragge paddr_t uv_addr; /* Physical address of map registers */
53 1.2 ragge struct uba_regs *uv_uba;/* Where applicable */
54 1.2 ragge int uh_ibase;
55 1.2 ragge int uh_zvtime;
56 1.2 ragge int uh_zvtotal;
57 1.2 ragge int uh_zvcnt;
58 1.2 ragge };
59 1.2 ragge
60 1.2 ragge /*
61 1.2 ragge * Size of unibus memory address space in pages
62 1.2 ragge * (also number of map registers).
63 1.2 ragge */
64 1.2 ragge #define UBAPAGES 496
65 1.2 ragge #define UBAIOADDR 0760000 /* start of I/O page */
66 1.2 ragge #define UBAIOPAGES 16
67 1.2 ragge
68 1.2 ragge /*
69 1.2 ragge * DW780/DW750 hardware registers
70 1.2 ragge */
71 1.2 ragge struct uba_regs {
72 1.2 ragge int uba_cnfgr; /* configuration register */
73 1.2 ragge int uba_cr; /* control register */
74 1.2 ragge int uba_sr; /* status register */
75 1.2 ragge int uba_dcr; /* diagnostic control register */
76 1.2 ragge int uba_fmer; /* failed map entry register */
77 1.2 ragge int uba_fubar; /* failed UNIBUS address register */
78 1.2 ragge int pad1[2];
79 1.2 ragge int uba_brsvr[4];
80 1.2 ragge int uba_brrvr[4]; /* receive vector registers */
81 1.2 ragge int uba_dpr[16]; /* buffered data path register */
82 1.2 ragge int pad2[480];
83 1.2 ragge struct pte uba_map[UBAPAGES]; /* unibus map register */
84 1.2 ragge int pad3[UBAIOPAGES]; /* no maps for device address space */
85 1.1 ragge };
86 1.1 ragge
87 1.1 ragge void uba_dma_init __P((struct uba_vsoftc *));
88