41 #define SISUSB_NEW_CONFIG_COMPAT
53 #define SISUSB_VERSION 0
54 #define SISUSB_REVISION 0
55 #define SISUSB_PATCHLEVEL 8
59 #ifdef CONFIG_USB_SISUSBVGA_CON
60 #define INCL_SISUSB_CON 1
69 #define SISUSB_MINOR 133
72 #define SISUSB_IBUF_SIZE 0x01000
73 #define SISUSB_OBUF_SIZE 0x10000
94 #define SISUSB_CORRECT_ENDIANNESS_PACKET(p) \
96 p->header = cpu_to_le16(p->header); \
97 p->address = cpu_to_le32(p->address); \
98 p->data = cpu_to_le32(p->data); \
101 #define SISUSB_CORRECT_ENDIANNESS_PACKET(p)
141 #ifdef INCL_SISUSB_CON
143 unsigned long scrbuf;
144 unsigned int scrbuf_size;
145 int haveconsole, con_first, con_last;
147 int textmodedestroyed;
148 unsigned int sisusb_num_columns;
149 int cur_start_addr, con_rolled_over;
150 int sisusb_cursor_loc, bad_cursor_pos;
151 int sisusb_cursor_size_from;
152 int sisusb_cursor_size_to;
153 int current_font_height, current_font_512;
154 int font_backup_size, font_backup_height, font_backup_512;
157 struct vc_data *sisusb_display_fg;
163 #define to_sisusb_dev(d) container_of(d, struct sisusb_usb_data, kref)
168 #define SU_URB_BUSY 1
169 #define SU_URB_ALLOC 2
173 #define SISUSB_EP_GFX_IN 0x0e
174 #define SISUSB_EP_GFX_OUT 0x0e
176 #define SISUSB_EP_GFX_BULK_OUT 0x01
177 #define SISUSB_EP_GFX_BULK_IN 0x02
179 #define SISUSB_EP_GFX_LBULK_OUT 0x03
181 #define SISUSB_EP_UNKNOWN_04 0x04
183 #define SISUSB_EP_BRIDGE_IN 0x0d
184 #define SISUSB_EP_BRIDGE_OUT 0x0d
186 #define SISUSB_TYPE_MEM 0
187 #define SISUSB_TYPE_IO 1
195 #define CLEARPACKET(packet) memset(packet, 0, 10)
199 #define SISUSB_PCI_MEMBASE 0xd0000000
200 #define SISUSB_PCI_MMIOBASE 0xe4000000
201 #define SISUSB_PCI_IOPORTBASE 0x0000d000
203 #define SISUSB_PCI_PSEUDO_MEMBASE 0x10000000
204 #define SISUSB_PCI_PSEUDO_MMIOBASE 0x20000000
205 #define SISUSB_PCI_PSEUDO_IOPORTBASE 0x0000d000
206 #define SISUSB_PCI_PSEUDO_PCIBASE 0x00010000
208 #define SISUSB_PCI_MMIOSIZE (128*1024)
209 #define SISUSB_PCI_PCONFSIZE 0x5c
213 #define AROFFSET 0x40
214 #define ARROFFSET 0x41
215 #define GROFFSET 0x4e
216 #define SROFFSET 0x44
217 #define CROFFSET 0x54
218 #define MISCROFFSET 0x4c
219 #define MISCWOFFSET 0x42
220 #define INPUTSTATOFFSET 0x5A
221 #define PART1OFFSET 0x04
222 #define PART2OFFSET 0x10
223 #define PART3OFFSET 0x12
224 #define PART4OFFSET 0x14
225 #define PART5OFFSET 0x16
226 #define CAPTUREOFFSET 0x00
227 #define VIDEOOFFSET 0x02
228 #define COLREGOFFSET 0x48
229 #define PELMASKOFFSET 0x46
230 #define VGAENABLE 0x43
232 #define SISAR SISUSB_PCI_IOPORTBASE + AROFFSET
233 #define SISARR SISUSB_PCI_IOPORTBASE + ARROFFSET
234 #define SISGR SISUSB_PCI_IOPORTBASE + GROFFSET
235 #define SISSR SISUSB_PCI_IOPORTBASE + SROFFSET
236 #define SISCR SISUSB_PCI_IOPORTBASE + CROFFSET
237 #define SISMISCR SISUSB_PCI_IOPORTBASE + MISCROFFSET
238 #define SISMISCW SISUSB_PCI_IOPORTBASE + MISCWOFFSET
239 #define SISINPSTAT SISUSB_PCI_IOPORTBASE + INPUTSTATOFFSET
240 #define SISPART1 SISUSB_PCI_IOPORTBASE + PART1OFFSET
241 #define SISPART2 SISUSB_PCI_IOPORTBASE + PART2OFFSET
242 #define SISPART3 SISUSB_PCI_IOPORTBASE + PART3OFFSET
243 #define SISPART4 SISUSB_PCI_IOPORTBASE + PART4OFFSET
244 #define SISPART5 SISUSB_PCI_IOPORTBASE + PART5OFFSET
245 #define SISCAP SISUSB_PCI_IOPORTBASE + CAPTUREOFFSET
246 #define SISVID SISUSB_PCI_IOPORTBASE + VIDEOOFFSET
247 #define SISCOLIDXR SISUSB_PCI_IOPORTBASE + COLREGOFFSET - 1
248 #define SISCOLIDX SISUSB_PCI_IOPORTBASE + COLREGOFFSET
249 #define SISCOLDATA SISUSB_PCI_IOPORTBASE + COLREGOFFSET + 1
250 #define SISCOL2IDX SISPART5
251 #define SISCOL2DATA SISPART5 + 1
252 #define SISPEL SISUSB_PCI_IOPORTBASE + PELMASKOFFSET
253 #define SISVGAEN SISUSB_PCI_IOPORTBASE + VGAENABLE
254 #define SISDACA SISCOLIDX
255 #define SISDACD SISCOLDATA
262 #define SISUSB_ID 0x53495355
293 #define SUCMD_GET 0x01
294 #define SUCMD_SET 0x02
295 #define SUCMD_SETOR 0x03
296 #define SUCMD_SETAND 0x04
297 #define SUCMD_SETANDOR 0x05
298 #define SUCMD_SETMASK 0x06
300 #define SUCMD_CLRSCR 0x07
302 #define SUCMD_HANDLETEXTMODE 0x08
304 #define SUCMD_SETMODE 0x09
305 #define SUCMD_SETVESAMODE 0x0a
307 #define SISUSB_COMMAND _IOWR(0xF3,0x3D,struct sisusb_command)
308 #define SISUSB_GET_CONFIG_SIZE _IOR(0xF3,0x3E,__u32)
309 #define SISUSB_GET_CONFIG _IOR(0xF3,0x3F,struct sisusb_info)