2 * Access to VGA videoram
4 * (c) 1998 Martin Mares <mj@ucw.cz>
7 #ifndef _LINUX_ASM_VGA_H_
8 #define _LINUX_ASM_VGA_H_
11 #include <asm/processor.h>
13 #include <linux/config.h>
14 #include <linux/console.h>
16 #define VT_BUF_HAVE_RW
18 extern inline void scr_writew(u16 val
, u16
*addr
)
20 /* If using vgacon (not fbcon) byteswap the writes.
21 * If non-vgacon assume fbcon and don't byteswap
22 * just like include/linux/vt_buffer.h.
23 * XXX: this is a performance loss so get rid of it
24 * as soon as fbcon works on prep.
28 if ( conswitchp
!= &vga_con
)
31 #endif /* CONFIG_FB */
35 extern inline u16
scr_readw(const u16
*addr
)
38 if ( conswitchp
!= &vga_con
)
41 #endif /* CONFIG_FB */
42 return ld_le16((unsigned short *)addr
);
45 #define VT_BUF_HAVE_MEMCPYF
46 #define scr_memcpyw_from memcpy
47 #define scr_memcpyw_to memcpy
49 extern unsigned long vgacon_remap_base
;
50 #define VGA_MAP_MEM(x) (x + vgacon_remap_base)
51 #define vga_readb(x) (*(x))
52 #define vga_writeb(x,y) (*(y) = (x))