0001
0002
0003
0004
0005
0006
0007 #ifndef _ASM_VGA_H
0008 #define _ASM_VGA_H
0009
0010 #include <linux/string.h>
0011 #include <asm/addrspace.h>
0012 #include <asm/byteorder.h>
0013
0014
0015
0016
0017
0018
0019 #define VGA_MAP_MEM(x, s) CKSEG1ADDR(0x10000000L + (unsigned long)(x))
0020
0021 #define vga_readb(x) (*(x))
0022 #define vga_writeb(x, y) (*(y) = (x))
0023
0024 #define VT_BUF_HAVE_RW
0025
0026
0027
0028
0029
0030
0031
0032 #undef scr_writew
0033 #undef scr_readw
0034
0035 static inline void scr_writew(u16 val, volatile u16 *addr)
0036 {
0037 *addr = cpu_to_le16(val);
0038 }
0039
0040 static inline u16 scr_readw(volatile const u16 *addr)
0041 {
0042 return le16_to_cpu(*addr);
0043 }
0044
0045 static inline void scr_memsetw(u16 *s, u16 v, unsigned int count)
0046 {
0047 memset16(s, cpu_to_le16(v), count / 2);
0048 }
0049
0050 #define scr_memcpyw(d, s, c) memcpy(d, s, c)
0051 #define scr_memmovew(d, s, c) memmove(d, s, c)
0052 #define VT_BUF_HAVE_MEMCPYW
0053 #define VT_BUF_HAVE_MEMMOVEW
0054 #define VT_BUF_HAVE_MEMSETW
0055
0056 #endif