uba_common.h revision 1.5 1 1.5 matt /* $NetBSD: uba_common.h,v 1.5 2008/03/11 05:34:02 matt 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.3 agc * 3. Neither the name of the University nor the names of its contributors
20 1.2 ragge * may be used to endorse or promote products derived from this software
21 1.2 ragge * without specific prior written permission.
22 1.2 ragge *
23 1.2 ragge * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 1.2 ragge * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.2 ragge * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.2 ragge * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 1.2 ragge * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.2 ragge * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.2 ragge * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.2 ragge * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.2 ragge * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.2 ragge * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.2 ragge * SUCH DAMAGE.
34 1.1 ragge *
35 1.2 ragge * @(#)ubareg.h 7.8 (Berkeley) 5/9/91
36 1.1 ragge */
37 1.1 ragge
38 1.1 ragge /*
39 1.1 ragge * VAX-specific parts of the Unibus softc.
40 1.1 ragge */
41 1.2 ragge struct uba_regs;
42 1.1 ragge
43 1.1 ragge struct uba_vsoftc {
44 1.1 ragge struct uba_softc uv_sc;/* Common vars from dev/qbus/ubavar.h */
45 1.1 ragge struct vax_bus_dma_tag uv_dmat;
46 1.1 ragge struct vax_sgmap uv_sgmap;
47 1.1 ragge int uv_size; /* Size of UBA addressable memory */
48 1.2 ragge paddr_t uv_addr; /* Physical address of map registers */
49 1.2 ragge struct uba_regs *uv_uba;/* Where applicable */
50 1.2 ragge int uh_ibase;
51 1.2 ragge int uh_zvtime;
52 1.2 ragge int uh_zvtotal;
53 1.2 ragge int uh_zvcnt;
54 1.2 ragge };
55 1.2 ragge
56 1.2 ragge /*
57 1.2 ragge * Size of unibus memory address space in pages
58 1.2 ragge * (also number of map registers).
59 1.2 ragge */
60 1.2 ragge #define UBAPAGES 496
61 1.2 ragge #define UBAIOADDR 0760000 /* start of I/O page */
62 1.2 ragge #define UBAIOPAGES 16
63 1.2 ragge
64 1.2 ragge /*
65 1.2 ragge * DW780/DW750 hardware registers
66 1.2 ragge */
67 1.2 ragge struct uba_regs {
68 1.2 ragge int uba_cnfgr; /* configuration register */
69 1.2 ragge int uba_cr; /* control register */
70 1.2 ragge int uba_sr; /* status register */
71 1.2 ragge int uba_dcr; /* diagnostic control register */
72 1.2 ragge int uba_fmer; /* failed map entry register */
73 1.2 ragge int uba_fubar; /* failed UNIBUS address register */
74 1.2 ragge int pad1[2];
75 1.2 ragge int uba_brsvr[4];
76 1.2 ragge int uba_brrvr[4]; /* receive vector registers */
77 1.2 ragge int uba_dpr[16]; /* buffered data path register */
78 1.2 ragge int pad2[480];
79 1.2 ragge struct pte uba_map[UBAPAGES]; /* unibus map register */
80 1.2 ragge int pad3[UBAIOPAGES]; /* no maps for device address space */
81 1.1 ragge };
82 1.1 ragge
83 1.5 matt void uba_dma_init(struct uba_vsoftc *);
84