1#ifndef __LINUX_FBIO_H
2#define __LINUX_FBIO_H
3
4#include <uapi/asm/fbio.h>
5
6#define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap)
7#define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap)
8/* Addresses on the fd of a cgsix that are mappable */
9#define CG6_FBC    0x70000000
10#define CG6_TEC    0x70001000
11#define CG6_BTREGS 0x70002000
12#define CG6_FHC    0x70004000
13#define CG6_THC    0x70005000
14#define CG6_ROM    0x70006000
15#define CG6_RAM    0x70016000
16#define CG6_DHC    0x80000000
17
18#define CG3_MMAP_OFFSET 0x4000000
19
20/* Addresses on the fd of a tcx that are mappable */
21#define TCX_RAM8BIT   		0x00000000
22#define TCX_RAM24BIT   		0x01000000
23#define TCX_UNK3   		0x10000000
24#define TCX_UNK4   		0x20000000
25#define TCX_CONTROLPLANE   	0x28000000
26#define TCX_UNK6   		0x30000000
27#define TCX_UNK7   		0x38000000
28#define TCX_TEC    		0x70000000
29#define TCX_BTREGS 		0x70002000
30#define TCX_THC    		0x70004000
31#define TCX_DHC    		0x70008000
32#define TCX_ALT	   		0x7000a000
33#define TCX_SYNC   		0x7000e000
34#define TCX_UNK2    		0x70010000
35
36/* CG14 definitions */
37
38/* Offsets into the OBIO space: */
39#define CG14_REGS        0       /* registers */
40#define CG14_CURSORREGS  0x1000  /* cursor registers */
41#define CG14_DACREGS     0x2000  /* DAC registers */
42#define CG14_XLUT        0x3000  /* X Look Up Table -- ??? */
43#define CG14_CLUT1       0x4000  /* Color Look Up Table */
44#define CG14_CLUT2       0x5000  /* Color Look Up Table */
45#define CG14_CLUT3       0x6000  /* Color Look Up Table */
46#define CG14_AUTO	 0xf000
47
48struct  fbcmap32 {
49	int             index;          /* first element (0 origin) */
50	int             count;
51	u32		red;
52	u32		green;
53	u32		blue;
54};
55
56#define FBIOPUTCMAP32	_IOW('F', 3, struct fbcmap32)
57#define FBIOGETCMAP32	_IOW('F', 4, struct fbcmap32)
58
59struct fbcursor32 {
60	short set;		/* what to set, choose from the list above */
61	short enable;		/* cursor on/off */
62	struct fbcurpos pos;	/* cursor position */
63	struct fbcurpos hot;	/* cursor hot spot */
64	struct fbcmap32 cmap;	/* color map info */
65	struct fbcurpos size;	/* cursor bit map size */
66	u32	image;		/* cursor image bits */
67	u32	mask;		/* cursor mask bits */
68};
69
70#define FBIOSCURSOR32	_IOW('F', 24, struct fbcursor32)
71#define FBIOGCURSOR32	_IOW('F', 25, struct fbcursor32)
72#endif /* __LINUX_FBIO_H */
73