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