1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Access to VGA videoram
5 * (c) 1998 Martin Mares <mj@ucw.cz>
8 #ifndef _LINUX_ASM_VGA_H_
9 #define _LINUX_ASM_VGA_H_
11 #include <linux/bug.h>
12 #include <linux/string.h>
13 #include <asm/types.h>
15 #define VT_BUF_HAVE_RW
16 #define VT_BUF_HAVE_MEMSETW
17 #define VT_BUF_HAVE_MEMCPYW
18 #define VT_BUF_HAVE_MEMMOVEW
23 static inline void scr_writew(u16 val
, u16
*addr
)
25 BUG_ON((long) addr
>= 0);
30 static inline u16
scr_readw(const u16
*addr
)
32 BUG_ON((long) addr
>= 0);
37 static inline void scr_memsetw(u16
*p
, u16 v
, unsigned int n
)
39 BUG_ON((long) p
>= 0);
41 memset16(p
, cpu_to_le16(v
), n
/ 2);
44 static inline void scr_memcpyw(u16
*d
, u16
*s
, unsigned int n
)
46 BUG_ON((long) d
>= 0);
51 static inline void scr_memmovew(u16
*d
, u16
*s
, unsigned int n
)
53 BUG_ON((long) d
>= 0);
58 #define VGA_MAP_MEM(x,s) (x)