Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[deliverable/linux.git] / arch / powerpc / include / asm / vga.h
CommitLineData
8b22cc01 1#ifndef _ASM_POWERPC_VGA_H_
2#define _ASM_POWERPC_VGA_H_
3
4#ifdef __KERNEL__
5
1da177e4
LT
6/*
7 * Access to VGA videoram
8 *
9 * (c) 1998 Martin Mares <mj@ucw.cz>
1da177e4
LT
10 */
11
1da177e4
LT
12
13#include <asm/io.h>
14
1da177e4
LT
15
16#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE)
17
18#define VT_BUF_HAVE_RW
19/*
20 * These are only needed for supporting VGA or MDA text mode, which use little
21 * endian byte ordering.
22 * In other cases, we can optimize by using native byte ordering and
23 * <linux/vt_buffer.h> has already done the right job for us.
24 */
25
26static inline void scr_writew(u16 val, volatile u16 *addr)
27{
f5718726 28 *addr = cpu_to_le16(val);
1da177e4
LT
29}
30
31static inline u16 scr_readw(volatile const u16 *addr)
32{
f5718726 33 return le16_to_cpu(*addr);
1da177e4
LT
34}
35
36#define VT_BUF_HAVE_MEMCPYW
37#define scr_memcpyw memcpy
38
39#endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */
40
8b22cc01 41#ifdef __powerpc64__
4f1bcaf0 42#define VGA_MAP_MEM(x,s) ((unsigned long) ioremap((x), s))
8b22cc01 43#else
e88f157d 44#define VGA_MAP_MEM(x,s) (x)
8b22cc01 45#endif
1da177e4
LT
46
47#define vga_readb(x) (*(x))
48#define vga_writeb(x,y) (*(y) = (x))
49
8b22cc01 50#endif /* __KERNEL__ */
51#endif /* _ASM_POWERPC_VGA_H_ */
This page took 0.765045 seconds and 5 git commands to generate.