diff options
-rw-r--r-- | include/asm-powerpc/vga.h (renamed from include/asm-ppc64/vga.h) | 20 | ||||
-rw-r--r-- | include/asm-ppc/vga.h | 46 |
2 files changed, 12 insertions, 54 deletions
diff --git a/include/asm-ppc64/vga.h b/include/asm-powerpc/vga.h index c09849743f45..f8d350aabf1a 100644 --- a/include/asm-ppc64/vga.h +++ b/include/asm-powerpc/vga.h | |||
@@ -1,16 +1,14 @@ | |||
1 | #ifndef _ASM_POWERPC_VGA_H_ | ||
2 | #define _ASM_POWERPC_VGA_H_ | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
1 | /* | 6 | /* |
2 | * Access to VGA videoram | 7 | * Access to VGA videoram |
3 | * | 8 | * |
4 | * (c) 1998 Martin Mares <mj@ucw.cz> | 9 | * (c) 1998 Martin Mares <mj@ucw.cz> |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _LINUX_ASM_VGA_H_ | ||
13 | #define _LINUX_ASM_VGA_H_ | ||
14 | 12 | ||
15 | #include <asm/io.h> | 13 | #include <asm/io.h> |
16 | 14 | ||
@@ -42,9 +40,15 @@ static inline u16 scr_readw(volatile const u16 *addr) | |||
42 | #endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */ | 40 | #endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */ |
43 | 41 | ||
44 | extern unsigned long vgacon_remap_base; | 42 | extern unsigned long vgacon_remap_base; |
43 | |||
44 | #ifdef __powerpc64__ | ||
45 | #define VGA_MAP_MEM(x) ((unsigned long) ioremap((x), 0)) | 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 | ||
46 | 49 | ||
47 | #define vga_readb(x) (*(x)) | 50 | #define vga_readb(x) (*(x)) |
48 | #define vga_writeb(x,y) (*(y) = (x)) | 51 | #define vga_writeb(x,y) (*(y) = (x)) |
49 | 52 | ||
50 | #endif | 53 | #endif /* __KERNEL__ */ |
54 | #endif /* _ASM_POWERPC_VGA_H_ */ | ||
diff --git a/include/asm-ppc/vga.h b/include/asm-ppc/vga.h deleted file mode 100644 index c5864734e3e1..000000000000 --- a/include/asm-ppc/vga.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Access to VGA videoram | ||
3 | * | ||
4 | * (c) 1998 Martin Mares <mj@ucw.cz> | ||
5 | */ | ||
6 | |||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef _LINUX_ASM_VGA_H_ | ||
9 | #define _LINUX_ASM_VGA_H_ | ||
10 | |||
11 | #include <asm/io.h> | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | |||
15 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) | ||
16 | |||
17 | #define VT_BUF_HAVE_RW | ||
18 | /* | ||
19 | * These are only needed for supporting VGA or MDA text mode, which use little | ||
20 | * endian byte ordering. | ||
21 | * In other cases, we can optimize by using native byte ordering and | ||
22 | * <linux/vt_buffer.h> has already done the right job for us. | ||
23 | */ | ||
24 | |||
25 | extern inline void scr_writew(u16 val, volatile u16 *addr) | ||
26 | { | ||
27 | st_le16(addr, val); | ||
28 | } | ||
29 | |||
30 | extern inline u16 scr_readw(volatile const u16 *addr) | ||
31 | { | ||
32 | return ld_le16(addr); | ||
33 | } | ||
34 | |||
35 | #define VT_BUF_HAVE_MEMCPYW | ||
36 | #define scr_memcpyw memcpy | ||
37 | |||
38 | #endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */ | ||
39 | |||
40 | extern unsigned long vgacon_remap_base; | ||
41 | #define VGA_MAP_MEM(x) (x + vgacon_remap_base) | ||
42 | #define vga_readb(x) (*(x)) | ||
43 | #define vga_writeb(x,y) (*(y) = (x)) | ||
44 | |||
45 | #endif | ||
46 | #endif /* __KERNEL__ */ | ||