18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __LINUX_FBIO_H 38c2ecf20Sopenharmony_ci#define __LINUX_FBIO_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <uapi/asm/fbio.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap) 88c2ecf20Sopenharmony_ci#define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap) 98c2ecf20Sopenharmony_ci/* Addresses on the fd of a cgsix that are mappable */ 108c2ecf20Sopenharmony_ci#define CG6_FBC 0x70000000 118c2ecf20Sopenharmony_ci#define CG6_TEC 0x70001000 128c2ecf20Sopenharmony_ci#define CG6_BTREGS 0x70002000 138c2ecf20Sopenharmony_ci#define CG6_FHC 0x70004000 148c2ecf20Sopenharmony_ci#define CG6_THC 0x70005000 158c2ecf20Sopenharmony_ci#define CG6_ROM 0x70006000 168c2ecf20Sopenharmony_ci#define CG6_RAM 0x70016000 178c2ecf20Sopenharmony_ci#define CG6_DHC 0x80000000 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define CG3_MMAP_OFFSET 0x4000000 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* Addresses on the fd of a tcx that are mappable */ 228c2ecf20Sopenharmony_ci#define TCX_RAM8BIT 0x00000000 238c2ecf20Sopenharmony_ci#define TCX_RAM24BIT 0x01000000 248c2ecf20Sopenharmony_ci#define TCX_UNK3 0x10000000 258c2ecf20Sopenharmony_ci#define TCX_UNK4 0x20000000 268c2ecf20Sopenharmony_ci#define TCX_CONTROLPLANE 0x28000000 278c2ecf20Sopenharmony_ci#define TCX_UNK6 0x30000000 288c2ecf20Sopenharmony_ci#define TCX_UNK7 0x38000000 298c2ecf20Sopenharmony_ci#define TCX_TEC 0x70000000 308c2ecf20Sopenharmony_ci#define TCX_BTREGS 0x70002000 318c2ecf20Sopenharmony_ci#define TCX_THC 0x70004000 328c2ecf20Sopenharmony_ci#define TCX_DHC 0x70008000 338c2ecf20Sopenharmony_ci#define TCX_ALT 0x7000a000 348c2ecf20Sopenharmony_ci#define TCX_SYNC 0x7000e000 358c2ecf20Sopenharmony_ci#define TCX_UNK2 0x70010000 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* CG14 definitions */ 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci/* Offsets into the OBIO space: */ 408c2ecf20Sopenharmony_ci#define CG14_REGS 0 /* registers */ 418c2ecf20Sopenharmony_ci#define CG14_CURSORREGS 0x1000 /* cursor registers */ 428c2ecf20Sopenharmony_ci#define CG14_DACREGS 0x2000 /* DAC registers */ 438c2ecf20Sopenharmony_ci#define CG14_XLUT 0x3000 /* X Look Up Table -- ??? */ 448c2ecf20Sopenharmony_ci#define CG14_CLUT1 0x4000 /* Color Look Up Table */ 458c2ecf20Sopenharmony_ci#define CG14_CLUT2 0x5000 /* Color Look Up Table */ 468c2ecf20Sopenharmony_ci#define CG14_CLUT3 0x6000 /* Color Look Up Table */ 478c2ecf20Sopenharmony_ci#define CG14_AUTO 0xf000 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_cistruct fbcmap32 { 508c2ecf20Sopenharmony_ci int index; /* first element (0 origin) */ 518c2ecf20Sopenharmony_ci int count; 528c2ecf20Sopenharmony_ci u32 red; 538c2ecf20Sopenharmony_ci u32 green; 548c2ecf20Sopenharmony_ci u32 blue; 558c2ecf20Sopenharmony_ci}; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) 588c2ecf20Sopenharmony_ci#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_cistruct fbcursor32 { 618c2ecf20Sopenharmony_ci short set; /* what to set, choose from the list above */ 628c2ecf20Sopenharmony_ci short enable; /* cursor on/off */ 638c2ecf20Sopenharmony_ci struct fbcurpos pos; /* cursor position */ 648c2ecf20Sopenharmony_ci struct fbcurpos hot; /* cursor hot spot */ 658c2ecf20Sopenharmony_ci struct fbcmap32 cmap; /* color map info */ 668c2ecf20Sopenharmony_ci struct fbcurpos size; /* cursor bit map size */ 678c2ecf20Sopenharmony_ci u32 image; /* cursor image bits */ 688c2ecf20Sopenharmony_ci u32 mask; /* cursor mask bits */ 698c2ecf20Sopenharmony_ci}; 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) 728c2ecf20Sopenharmony_ci#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) 738c2ecf20Sopenharmony_ci#endif /* __LINUX_FBIO_H */ 74