Annotation of sys/arch/sparc/dev/bppreg.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: bppreg.h,v 1.3 2003/06/03 21:09:02 deraadt Exp $ */
2:
3: /*
4: * Copyright (c) 1997, Jason Downs. All rights reserved.
5: *
6: * Redistribution and use in source and binary forms, with or without
7: * modification, are permitted provided that the following conditions
8: * are met:
9: * 1. Redistributions of source code must retain the above copyright
10: * notice, this list of conditions and the following disclaimer.
11: * 2. Redistributions in binary form must reproduce the above copyright
12: * notice, this list of conditions and the following disclaimer in the
13: * documentation and/or other materials provided with the distribution.
14: *
15: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
16: * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18: * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
19: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22: * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25: * SUCH DAMAGE.
26: */
27:
28: /*
29: * based on work by Stephen Williams, Gus Baldauf, and Peter Zaitcev
30: */
31:
32: /*
33: * BPP Register Block
34: */
35: struct bppregs {
36:
37: volatile u_int32_t bpp_csr;
38: volatile u_int32_t bpp_addr;
39: volatile u_int32_t bpp_bcnt;
40: volatile u_int32_t bpp_tst_csr;
41:
42: volatile u_int16_t bpp_hcr;
43: volatile u_int16_t bpp_ocr;
44: volatile u_int8_t bpp_dr;
45: volatile u_int8_t bpp_tcr;
46: volatile u_int8_t bpp_or;
47: volatile u_int8_t bpp_ir;
48: volatile u_int16_t bpp_icr;
49: };
50:
51:
52: #define BPP_DEV_ID_MASK 0xf0000000
53: #define BPP_DEV_ID_ZEBRA 0x40000000
54: #define BPP_DEV_ID_L64854 0xa0000000
55: #define BPP_NA_LOADED 0x08000000
56: #define BPP_A_LOADED 0x04000000
57: #define BPP_DMA_ON 0x02000000
58: #define BPP_EN_NEXT 0x01000000
59: #define BPP_TCI_DIS 0x00800000
60: #define BPP_DIAG 0x00100000
61:
62: #define BPP_BURST_SIZE 0x000c0000
63: #define BPP_BURST_8 0x00000000
64: #define BPP_BURST_4 0x00040000
65: #define BPP_BURST_1 0x00080000
66: #define BPP_TC 0x00004000
67:
68: #define BPP_EN_CNT 0x00002000
69: #define BPP_EN_DMA 0x00000200
70: #define BPP_WRITE 0x00000100
71: #define BPP_RESET 0x00000080
72: #define BPP_SLAVE_ERR 0x00000040
73: #define BPP_INVALIDATE 0x00000020
74: #define BPP_INT_EN 0x00000010
75: #define BPP_DRAINING 0x0000000c
76:
77: #define BPP_ERR_PEND 0x00000002
78: #define BPP_INT_PEND 0x00000001
79:
80:
81: #define BPP_HCR_TEST 0x8000
82: #define BPP_HCR_DSW 0x7f00
83: #define BPP_HCR_DDS 0x007f
84:
85:
86: #define BPP_OCR_MEM_CLR 0x8000
87: #define BPP_OCR_DATA_SRC 0x4000
88: #define BPP_OCR_DS_DSEL 0x2000
89: #define BPP_OCR_BUSY_DSEL 0x1000
90: #define BPP_OCR_ACK_DSEL 0x0800
91: #define BPP_OCR_EN_DIAG 0x0400
92: #define BPP_OCR_BUSY_OP 0x0200
93: #define BPP_OCR_ACK_OP 0x0100
94: #define BPP_OCR_SRST 0x0080
95: #define BPP_OCR_IDLE 0x0008
96: #define BPP_OCR_V_ILCK 0x0002
97: #define BPP_OCR_EN_VER 0x0001
98:
99:
100: #define BPP_TCR_DIR 0x08
101: #define BPP_TCR_BUSY 0x04
102: #define BPP_TCR_ACK 0x02
103: #define BPP_TCR_DS 0x01
104:
105:
106: #define BPP_OR_V3 0x20
107: #define BPP_OR_V2 0x10
108: #define BPP_OR_V1 0x08
109: #define BPP_OR_INIT 0x04
110: #define BPP_OR_AFXN 0x02
111: #define BPP_OR_SLCT_IN 0x01
112:
113:
114: #define BPP_IR_PE 0x04
115: #define BPP_IR_SLCT 0x02
116: #define BPP_IR_ERR 0x01
117:
118:
119: #define BPP_DS_IRQ 0x8000
120: #define BPP_ACK_IRQ 0x4000
121: #define BPP_BUSY_IRQ 0x2000
122: #define BPP_PE_IRQ 0x1000
123: #define BPP_SLCT_IRQ 0x0800
124: #define BPP_ERR_IRQ 0x0400
125: #define BPP_DS_IRQ_EN 0x0200
126: #define BPP_ACK_IRQ_EN 0x0100
127: #define BPP_BUSY_IRP 0x0080
128: #define BPP_BUSY_IRQ_EN 0x0040
129: #define BPP_PE_IRP 0x0020
130: #define BPP_PE_IRQ_EN 0x0010
131: #define BPP_SLCT_IRP 0x0008
132: #define BPP_SLCT_IRQ_EN 0x0004
133: #define BPP_ERR_IRP 0x0002
134: #define BPP_ERR_IRQ_EN 0x0001
CVSweb