Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
staging
xgifb
vb_util.c
Go to the documentation of this file.
1
#include "
vgatypes.h
"
2
#include "
vb_util.h
"
3
4
void
xgifb_reg_set
(
unsigned
long
port
,
u8
index
,
u8
data
)
5
{
6
outb
(index, port);
7
outb
(data, port + 1);
8
}
9
10
u8
xgifb_reg_get
(
unsigned
long
port
,
u8
index
)
11
{
12
u8
data
;
13
14
outb
(index, port);
15
data =
inb
(port + 1);
16
return
data
;
17
}
18
19
void
xgifb_reg_and_or
(
unsigned
long
port
,
u8
index
,
20
unsigned
data_and,
unsigned
data_or)
21
{
22
u8
temp
;
23
24
temp =
xgifb_reg_get
(port, index);
/* XGINew_Part1Port index 02 */
25
temp = (temp & data_and) | data_or;
26
xgifb_reg_set
(port, index, temp);
27
}
28
29
void
xgifb_reg_and
(
unsigned
long
port
,
u8
index
,
unsigned
data_and)
30
{
31
u8
temp
;
32
33
temp =
xgifb_reg_get
(port, index);
/* XGINew_Part1Port index 02 */
34
temp &= data_and;
35
xgifb_reg_set
(port, index, temp);
36
}
37
38
void
xgifb_reg_or
(
unsigned
long
port
,
u8
index
,
unsigned
data_or)
39
{
40
u8
temp
;
41
42
temp =
xgifb_reg_get
(port, index);
/* XGINew_Part1Port index 02 */
43
temp |= data_or;
44
xgifb_reg_set
(port, index, temp);
45
}
Generated on Thu Jan 10 2013 14:32:58 for Linux Kernel by
1.8.2