[PATCH] arch/sparc64/Kconfig: fix HUGETLB_PAGE_SIZE_64K dependencies
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-powerpc / vga.h
blobf8d350aabf1a019f49ca194ff19f9f6b211d853c
1 #ifndef _ASM_POWERPC_VGA_H_
2 #define _ASM_POWERPC_VGA_H_
4 #ifdef __KERNEL__
6 /*
7 * Access to VGA videoram
9 * (c) 1998 Martin Mares <mj@ucw.cz>
13 #include <asm/io.h>
15 #include <linux/config.h>
17 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE)
19 #define VT_BUF_HAVE_RW
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.
27 static inline void scr_writew(u16 val, volatile u16 *addr)
29 st_le16(addr, val);
32 static inline u16 scr_readw(volatile const u16 *addr)
34 return ld_le16(addr);
37 #define VT_BUF_HAVE_MEMCPYW
38 #define scr_memcpyw memcpy
40 #endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */
42 extern unsigned long vgacon_remap_base;
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
50 #define vga_readb(x) (*(x))
51 #define vga_writeb(x,y) (*(y) = (x))
53 #endif /* __KERNEL__ */
54 #endif /* _ASM_POWERPC_VGA_H_ */