Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4ec5e62d
Commit
4ec5e62d
authored
Sep 16, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do __iomem annotations on VGA state handling
parent
6c4b867b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
29 deletions
+29
-29
drivers/video/vgastate.c
drivers/video/vgastate.c
+6
-6
include/video/vga.h
include/video/vga.h
+23
-23
No files found.
drivers/video/vgastate.c
View file @
4ec5e62d
...
...
@@ -32,21 +32,21 @@ struct regstate {
__u8
misc
;
};
static
inline
unsigned
char
vga_rcrtcs
(
caddr_t
regbase
,
unsigned
short
iobase
,
static
inline
unsigned
char
vga_rcrtcs
(
void
__iomem
*
regbase
,
unsigned
short
iobase
,
unsigned
char
reg
)
{
vga_w
(
regbase
,
iobase
+
0x4
,
reg
);
return
vga_r
(
regbase
,
iobase
+
0x5
);
}
static
inline
void
vga_wcrtcs
(
caddr_t
regbase
,
unsigned
short
iobase
,
static
inline
void
vga_wcrtcs
(
void
__iomem
*
regbase
,
unsigned
short
iobase
,
unsigned
char
reg
,
unsigned
char
val
)
{
vga_w
(
regbase
,
iobase
+
0x4
,
reg
);
vga_w
(
regbase
,
iobase
+
0x5
,
val
);
}
static
void
save_vga_text
(
struct
vgastate
*
state
,
caddr_t
fbbase
)
static
void
save_vga_text
(
struct
vgastate
*
state
,
void
__iomem
*
fbbase
)
{
struct
regstate
*
saved
=
(
struct
regstate
*
)
state
->
vidstate
;
int
i
;
...
...
@@ -134,7 +134,7 @@ static void save_vga_text(struct vgastate *state, caddr_t fbbase)
vga_wseq
(
state
->
vgabase
,
VGA_SEQ_CLOCK_MODE
,
seq1
);
}
static
void
restore_vga_text
(
struct
vgastate
*
state
,
caddr_t
fbbase
)
static
void
restore_vga_text
(
struct
vgastate
*
state
,
void
__iomem
*
fbbase
)
{
struct
regstate
*
saved
=
(
struct
regstate
*
)
state
->
vidstate
;
int
i
;
...
...
@@ -403,7 +403,7 @@ int save_vga(struct vgastate *state)
}
if
(
state
->
flags
&
VGA_SAVE_FONTS
)
{
caddr_t
fbbase
;
void
__iomem
*
fbbase
;
/* exit if window is less than 32K */
if
(
state
->
memsize
&&
state
->
memsize
<
4
*
8192
)
{
...
...
@@ -473,7 +473,7 @@ int restore_vga (struct vgastate *state)
restore_vga_mode
(
state
);
if
(
state
->
flags
&
VGA_SAVE_FONTS
)
{
caddr_t
fbbase
=
ioremap
(
state
->
membase
,
state
->
memsize
);
void
__iomem
*
fbbase
=
ioremap
(
state
->
membase
,
state
->
memsize
);
if
(
!
fbbase
)
{
vga_cleanup
(
state
);
...
...
include/video/vga.h
View file @
4ec5e62d
...
...
@@ -203,7 +203,7 @@
#define VGA_SAVE_CMAP 16
/* save/restore color map/DAC */
struct
vgastate
{
caddr_t
vgabase
;
/* mmio base, if supported */
void
__iomem
*
vgabase
;
/* mmio base, if supported */
unsigned
long
membase
;
/* VGA window base, 0 for default - 0xA000 */
__u32
memsize
;
/* VGA window size, 0 for default 64K */
__u32
flags
;
/* what state[s] to save (see VGA_SAVE_*) */
...
...
@@ -238,23 +238,23 @@ static inline void vga_io_w_fast (unsigned short port, unsigned char reg,
outw
(
VGA_OUT16VAL
(
val
,
reg
),
port
);
}
static
inline
unsigned
char
vga_mm_r
(
caddr_t
regbase
,
unsigned
short
port
)
static
inline
unsigned
char
vga_mm_r
(
void
__iomem
*
regbase
,
unsigned
short
port
)
{
return
readb
(
regbase
+
port
);
}
static
inline
void
vga_mm_w
(
caddr_t
regbase
,
unsigned
short
port
,
unsigned
char
val
)
static
inline
void
vga_mm_w
(
void
__iomem
*
regbase
,
unsigned
short
port
,
unsigned
char
val
)
{
writeb
(
val
,
regbase
+
port
);
}
static
inline
void
vga_mm_w_fast
(
caddr_t
regbase
,
unsigned
short
port
,
static
inline
void
vga_mm_w_fast
(
void
__iomem
*
regbase
,
unsigned
short
port
,
unsigned
char
reg
,
unsigned
char
val
)
{
writew
(
VGA_OUT16VAL
(
val
,
reg
),
regbase
+
port
);
}
static
inline
unsigned
char
vga_r
(
caddr_t
regbase
,
unsigned
short
port
)
static
inline
unsigned
char
vga_r
(
void
__iomem
*
regbase
,
unsigned
short
port
)
{
if
(
regbase
)
return
vga_mm_r
(
regbase
,
port
);
...
...
@@ -262,7 +262,7 @@ static inline unsigned char vga_r (caddr_t regbase, unsigned short port)
return
vga_io_r
(
port
);
}
static
inline
void
vga_w
(
caddr_t
regbase
,
unsigned
short
port
,
unsigned
char
val
)
static
inline
void
vga_w
(
void
__iomem
*
regbase
,
unsigned
short
port
,
unsigned
char
val
)
{
if
(
regbase
)
vga_mm_w
(
regbase
,
port
,
val
);
...
...
@@ -271,7 +271,7 @@ static inline void vga_w (caddr_t regbase, unsigned short port, unsigned char va
}
static
inline
void
vga_w_fast
(
caddr_t
regbase
,
unsigned
short
port
,
static
inline
void
vga_w_fast
(
void
__iomem
*
regbase
,
unsigned
short
port
,
unsigned
char
reg
,
unsigned
char
val
)
{
if
(
regbase
)
...
...
@@ -285,13 +285,13 @@ static inline void vga_w_fast (caddr_t regbase, unsigned short port,
* VGA CRTC register read/write
*/
static
inline
unsigned
char
vga_rcrt
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_rcrt
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_w
(
regbase
,
VGA_CRT_IC
,
reg
);
return
vga_r
(
regbase
,
VGA_CRT_DC
);
}
static
inline
void
vga_wcrt
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_wcrt
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
#ifdef VGA_OUTW_WRITE
vga_w_fast
(
regbase
,
VGA_CRT_IC
,
reg
,
val
);
...
...
@@ -317,13 +317,13 @@ static inline void vga_io_wcrt (unsigned char reg, unsigned char val)
#endif
/* VGA_OUTW_WRITE */
}
static
inline
unsigned
char
vga_mm_rcrt
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_mm_rcrt
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_mm_w
(
regbase
,
VGA_CRT_IC
,
reg
);
return
vga_mm_r
(
regbase
,
VGA_CRT_DC
);
}
static
inline
void
vga_mm_wcrt
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_mm_wcrt
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
#ifdef VGA_OUTW_WRITE
vga_mm_w_fast
(
regbase
,
VGA_CRT_IC
,
reg
,
val
);
...
...
@@ -338,13 +338,13 @@ static inline void vga_mm_wcrt (caddr_t regbase, unsigned char reg, unsigned cha
* VGA sequencer register read/write
*/
static
inline
unsigned
char
vga_rseq
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_rseq
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_w
(
regbase
,
VGA_SEQ_I
,
reg
);
return
vga_r
(
regbase
,
VGA_SEQ_D
);
}
static
inline
void
vga_wseq
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_wseq
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
#ifdef VGA_OUTW_WRITE
vga_w_fast
(
regbase
,
VGA_SEQ_I
,
reg
,
val
);
...
...
@@ -370,13 +370,13 @@ static inline void vga_io_wseq (unsigned char reg, unsigned char val)
#endif
/* VGA_OUTW_WRITE */
}
static
inline
unsigned
char
vga_mm_rseq
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_mm_rseq
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_mm_w
(
regbase
,
VGA_SEQ_I
,
reg
);
return
vga_mm_r
(
regbase
,
VGA_SEQ_D
);
}
static
inline
void
vga_mm_wseq
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_mm_wseq
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
#ifdef VGA_OUTW_WRITE
vga_mm_w_fast
(
regbase
,
VGA_SEQ_I
,
reg
,
val
);
...
...
@@ -390,13 +390,13 @@ static inline void vga_mm_wseq (caddr_t regbase, unsigned char reg, unsigned cha
* VGA graphics controller register read/write
*/
static
inline
unsigned
char
vga_rgfx
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_rgfx
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_w
(
regbase
,
VGA_GFX_I
,
reg
);
return
vga_r
(
regbase
,
VGA_GFX_D
);
}
static
inline
void
vga_wgfx
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_wgfx
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
#ifdef VGA_OUTW_WRITE
vga_w_fast
(
regbase
,
VGA_GFX_I
,
reg
,
val
);
...
...
@@ -422,13 +422,13 @@ static inline void vga_io_wgfx (unsigned char reg, unsigned char val)
#endif
/* VGA_OUTW_WRITE */
}
static
inline
unsigned
char
vga_mm_rgfx
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_mm_rgfx
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_mm_w
(
regbase
,
VGA_GFX_I
,
reg
);
return
vga_mm_r
(
regbase
,
VGA_GFX_D
);
}
static
inline
void
vga_mm_wgfx
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_mm_wgfx
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
#ifdef VGA_OUTW_WRITE
vga_mm_w_fast
(
regbase
,
VGA_GFX_I
,
reg
,
val
);
...
...
@@ -443,13 +443,13 @@ static inline void vga_mm_wgfx (caddr_t regbase, unsigned char reg, unsigned cha
* VGA attribute controller register read/write
*/
static
inline
unsigned
char
vga_rattr
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_rattr
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_w
(
regbase
,
VGA_ATT_IW
,
reg
);
return
vga_r
(
regbase
,
VGA_ATT_R
);
}
static
inline
void
vga_wattr
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_wattr
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
vga_w
(
regbase
,
VGA_ATT_IW
,
reg
);
vga_w
(
regbase
,
VGA_ATT_W
,
val
);
...
...
@@ -467,13 +467,13 @@ static inline void vga_io_wattr (unsigned char reg, unsigned char val)
vga_io_w
(
VGA_ATT_W
,
val
);
}
static
inline
unsigned
char
vga_mm_rattr
(
caddr_t
regbase
,
unsigned
char
reg
)
static
inline
unsigned
char
vga_mm_rattr
(
void
__iomem
*
regbase
,
unsigned
char
reg
)
{
vga_mm_w
(
regbase
,
VGA_ATT_IW
,
reg
);
return
vga_mm_r
(
regbase
,
VGA_ATT_R
);
}
static
inline
void
vga_mm_wattr
(
caddr_t
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
static
inline
void
vga_mm_wattr
(
void
__iomem
*
regbase
,
unsigned
char
reg
,
unsigned
char
val
)
{
vga_mm_w
(
regbase
,
VGA_ATT_IW
,
reg
);
vga_mm_w
(
regbase
,
VGA_ATT_W
,
val
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment