1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Access to VGA videoram 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * (c) 1998 Martin Mares <mj@ucw.cz> 6*4882a593Smuzhiyun */ 7*4882a593Smuzhiyun #ifndef __ASM_GENERIC_VGA_H 8*4882a593Smuzhiyun #define __ASM_GENERIC_VGA_H 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun /* 11*4882a593Smuzhiyun * On most architectures that support VGA, we can just 12*4882a593Smuzhiyun * recalculate addresses and then access the videoram 13*4882a593Smuzhiyun * directly without any black magic. 14*4882a593Smuzhiyun * 15*4882a593Smuzhiyun * Everyone else needs to ioremap the address and use 16*4882a593Smuzhiyun * proper I/O accesses. 17*4882a593Smuzhiyun */ 18*4882a593Smuzhiyun #ifndef VGA_MAP_MEM 19*4882a593Smuzhiyun #define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x) 20*4882a593Smuzhiyun #endif 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #define vga_readb(x) (*(x)) 23*4882a593Smuzhiyun #define vga_writeb(x, y) (*(y) = (x)) 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun #endif /* _ASM_GENERIC_VGA_H */ 26