diff options
author | linuxppc@jdl.com <linuxppc@jdl.com> | 2005-09-20 15:32:37 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-21 05:21:09 -0400 |
commit | 8b22cc010599075806b84cfe2955ab87ab07172c (patch) | |
tree | 56fa6fdd104f5b85f2cac63092149eca248a56e1 /include/asm-powerpc/vga.h | |
parent | a99eb2ef452ce685e40a433ceb187276ba0871f4 (diff) |
[PATCH] powerpc: Merge asm-ppc*/vga.h
Merge asm-ppc*/vga.h
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/vga.h')
-rw-r--r-- | include/asm-powerpc/vga.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/include/asm-powerpc/vga.h b/include/asm-powerpc/vga.h new file mode 100644 index 000000000000..f8d350aabf1a --- /dev/null +++ b/include/asm-powerpc/vga.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef _ASM_POWERPC_VGA_H_ | ||
2 | #define _ASM_POWERPC_VGA_H_ | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | /* | ||
7 | * Access to VGA videoram | ||
8 | * | ||
9 | * (c) 1998 Martin Mares <mj@ucw.cz> | ||
10 | */ | ||
11 | |||
12 | |||
13 | #include <asm/io.h> | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | |||
17 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) | ||
18 | |||
19 | #define VT_BUF_HAVE_RW | ||
20 | /* | ||
21 | * These are only needed for supporting VGA or MDA text mode, which use little | ||
22 | * endian byte ordering. | ||
23 | * In other cases, we can optimize by using native byte ordering and | ||
24 | * <linux/vt_buffer.h> has already done the right job for us. | ||
25 | */ | ||
26 | |||
27 | static inline void scr_writew(u16 val, volatile u16 *addr) | ||
28 | { | ||
29 | st_le16(addr, val); | ||
30 | } | ||
31 | |||
32 | static inline u16 scr_readw(volatile const u16 *addr) | ||
33 | { | ||
34 | return ld_le16(addr); | ||
35 | } | ||
36 | |||
37 | #define VT_BUF_HAVE_MEMCPYW | ||
38 | #define scr_memcpyw memcpy | ||
39 | |||
40 | #endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */ | ||
41 | |||
42 | extern unsigned long vgacon_remap_base; | ||
43 | |||
44 | #ifdef __powerpc64__ | ||
45 | #define VGA_MAP_MEM(x) ((unsigned long) ioremap((x), 0)) | ||
46 | #else | ||
47 | #define VGA_MAP_MEM(x) (x + vgacon_remap_base) | ||
48 | #endif | ||
49 | |||
50 | #define vga_readb(x) (*(x)) | ||
51 | #define vga_writeb(x,y) (*(y) = (x)) | ||
52 | |||
53 | #endif /* __KERNEL__ */ | ||
54 | #endif /* _ASM_POWERPC_VGA_H_ */ | ||