* added 0.99 linux version
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / asm-ppc / vga.h
blob85c9ec8a94835ed35baa2a6ed035ea0074cbc5ee
1 /*
2 * Access to VGA videoram
4 * (c) 1998 Martin Mares <mj@ucw.cz>
5 */
7 #ifndef _LINUX_ASM_VGA_H_
8 #define _LINUX_ASM_VGA_H_
10 #include <asm/io.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.
25 * -- Cort
27 #ifdef CONFIG_FB
28 if ( conswitchp != &vga_con )
29 (*(addr) = (val));
30 else
31 #endif /* CONFIG_FB */
32 st_le16(addr, val);
35 extern inline u16 scr_readw(const u16 *addr)
37 #ifdef CONFIG_FB
38 if ( conswitchp != &vga_con )
39 return (*(addr));
40 else
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))
54 #endif