]>
git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - arch/powerpc/include/asm/vga.h
1 #ifndef _ASM_POWERPC_VGA_H_
2 #define _ASM_POWERPC_VGA_H_
7 * Access to VGA videoram
9 * (c) 1998 Martin Mares <mj@ucw.cz>
16 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE)
18 #define VT_BUF_HAVE_RW
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.
26 static inline void scr_writew(u16 val
, volatile u16
*addr
)
28 *addr
= cpu_to_le16(val
);
31 static inline u16
scr_readw(volatile const u16
*addr
)
33 return le16_to_cpu(*addr
);
36 #define VT_BUF_HAVE_MEMSETW
37 static inline void scr_memsetw(u16
*s
, u16 v
, unsigned int n
)
39 memset16(s
, cpu_to_le16(v
), n
/ 2);
42 #define VT_BUF_HAVE_MEMCPYW
43 #define VT_BUF_HAVE_MEMMOVEW
44 #define scr_memcpyw memcpy
45 #define scr_memmovew memmove
47 #endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */
50 #define VGA_MAP_MEM(x,s) ((unsigned long) ioremap((x), s))
52 #define VGA_MAP_MEM(x,s) (x)
55 #define vga_readb(x) (*(x))
56 #define vga_writeb(x,y) (*(y) = (x))
58 #endif /* __KERNEL__ */
59 #endif /* _ASM_POWERPC_VGA_H_ */