lynxfbreg.h revision 1.1 1 /* $NetBSD: lynxfbreg.h,v 1.1 2012/03/02 13:20:57 nonaka Exp $ */
2 /* $OpenBSD: smfbreg.h,v 1.5 2010/08/27 12:48:54 miod Exp $ */
3
4 /*
5 * Copyright (c) 2009, 2010 Miodrag Vallat.
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20 /*
21 * Silicon Motion SM712 registers
22 */
23
24 /*
25 * DPR (2D drawing engine)
26 */
27
28 #define DPR_COORDS(x, y) (((x) << 16) | (y))
29
30 #define SM7XX_DPR_BASE 0x00408000
31 #define SMXXX_DPR_SIZE 0x00004000
32
33 #define DPR_SRC_COORDS 0x00
34 #define DPR_DST_COORDS 0x04
35 #define DPR_SPAN_COORDS 0x08
36 #define DPR_DE_CTRL 0x0c
37 #define DPR_PITCH 0x10
38 #define DPR_FG_COLOR 0x14
39 #define DPR_BG_COLOR 0x18
40 #define DPR_STRETCH 0x1c
41 #define DPR_COLOR_COMPARE 0x20
42 #define DPR_COLOR_COMPARE_MASK 0x24
43 #define DPR_BYTE_BIT_MASK 0x28
44 #define DPR_CROP_TOPLEFT_COORDS 0x2c
45 #define DPR_CROP_BOTRIGHT_COORDS 0x30
46 #define DPR_MONO_PATTERN_LO32 0x34
47 #define DPR_MONO_PATTERN_HI32 0x38
48 #define DPR_SRC_WINDOW 0x3c
49 #define DPR_SRC_BASE 0x40
50 #define DPR_DST_BASE 0x44
51
52 #define DE_CTRL_START 0x80000000
53 #define DE_CTRL_RTOL 0x08000000
54 #define DE_CTRL_COMMAND_MASK 0x001f0000
55 #define DE_CTRL_COMMAND_SHIFT 16
56 #define DE_CTRL_COMMAND_BITBLT 0x00
57 #define DE_CTRL_COMMAND_SOLIDFILL 0x01
58 #define DE_CTRL_ROP_ENABLE 0x00008000
59 #define DE_CTRL_ROP_MASK 0x000000ff
60 #define DE_CTRL_ROP_SHIFT 0
61 #define DE_CTRL_ROP_SRC 0x0c
62
63 /*
64 * VPR (Video Parameter Registers)
65 */
66
67 #define SM7XX_VPR_BASE 0x0040c000
68
69 /*
70 * MMIO (SM7XX only)
71 */
72
73 #define SM7XX_MMIO_BASE 0x00700000
74 #define SM7XX_MMIO_SIZE 0x00004000
75