aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/sisusbvga/sisusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/sisusbvga/sisusb.c')
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c50
1 files changed, 5 insertions, 45 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 19aedbc85ea4..738bd7c7451f 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -53,6 +53,7 @@
53#include <linux/vmalloc.h> 53#include <linux/vmalloc.h>
54 54
55#include "sisusb.h" 55#include "sisusb.h"
56#include "sisusb_init.h"
56 57
57#ifdef INCL_SISUSB_CON 58#ifdef INCL_SISUSB_CON
58#include <linux/font.h> 59#include <linux/font.h>
@@ -63,36 +64,6 @@
63/* Forward declarations / clean-up routines */ 64/* Forward declarations / clean-up routines */
64 65
65#ifdef INCL_SISUSB_CON 66#ifdef INCL_SISUSB_CON
66int sisusb_setreg(struct sisusb_usb_data *sisusb, int port, u8 data);
67int sisusb_getreg(struct sisusb_usb_data *sisusb, int port, u8 *data);
68int sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data);
69int sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data);
70int sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand, u8 myor);
71int sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, u8 index, u8 myor);
72int sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand);
73
74int sisusb_writeb(struct sisusb_usb_data *sisusb, u32 adr, u8 data);
75int sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data);
76int sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data);
77int sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data);
78int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src,
79 u32 dest, int length, size_t *bytes_written);
80
81int sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init);
82
83extern int SiSUSBSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
84extern int SiSUSBSetVESAMode(struct SiS_Private *SiS_Pr, unsigned short VModeNo);
85
86extern void sisusb_init_concode(void);
87extern int sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last);
88extern void sisusb_console_exit(struct sisusb_usb_data *sisusb);
89
90extern void sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location);
91
92extern int sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot,
93 u8 *arg, int cmapsz, int ch512, int dorecalc,
94 struct vc_data *c, int fh, int uplock);
95
96static int sisusb_first_vc = 0; 67static int sisusb_first_vc = 0;
97static int sisusb_last_vc = 0; 68static int sisusb_last_vc = 0;
98module_param_named(first, sisusb_first_vc, int, 0); 69module_param_named(first, sisusb_first_vc, int, 0);
@@ -1360,9 +1331,6 @@ sisusb_getreg(struct sisusb_usb_data *sisusb, int port, u8 *data)
1360} 1331}
1361#endif 1332#endif
1362 1333
1363#ifndef INCL_SISUSB_CON
1364static
1365#endif
1366int 1334int
1367sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data) 1335sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data)
1368{ 1336{
@@ -1372,9 +1340,6 @@ sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data)
1372 return ret; 1340 return ret;
1373} 1341}
1374 1342
1375#ifndef INCL_SISUSB_CON
1376static
1377#endif
1378int 1343int
1379sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data) 1344sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data)
1380{ 1345{
@@ -1384,9 +1349,6 @@ sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data)
1384 return ret; 1349 return ret;
1385} 1350}
1386 1351
1387#ifndef INCL_SISUSB_CON
1388static
1389#endif
1390int 1352int
1391sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx, 1353sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx,
1392 u8 myand, u8 myor) 1354 u8 myand, u8 myor)
@@ -1416,18 +1378,12 @@ sisusb_setidxregmask(struct sisusb_usb_data *sisusb, int port, u8 idx,
1416 return ret; 1378 return ret;
1417} 1379}
1418 1380
1419#ifndef INCL_SISUSB_CON
1420static
1421#endif
1422int 1381int
1423sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, u8 index, u8 myor) 1382sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, u8 index, u8 myor)
1424{ 1383{
1425 return(sisusb_setidxregandor(sisusb, port, index, 0xff, myor)); 1384 return(sisusb_setidxregandor(sisusb, port, index, 0xff, myor));
1426} 1385}
1427 1386
1428#ifndef INCL_SISUSB_CON
1429static
1430#endif
1431int 1387int
1432sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand) 1388sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand)
1433{ 1389{
@@ -1449,6 +1405,8 @@ sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data)
1449 return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data)); 1405 return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data));
1450} 1406}
1451 1407
1408#if 0
1409
1452int 1410int
1453sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data) 1411sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data)
1454{ 1412{
@@ -1461,6 +1419,8 @@ sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data)
1461 return(sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data)); 1419 return(sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data));
1462} 1420}
1463 1421
1422#endif /* 0 */
1423
1464int 1424int
1465sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, 1425sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src,
1466 u32 dest, int length, size_t *bytes_written) 1426 u32 dest, int length, size_t *bytes_written)