diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-05-14 00:56:34 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe2.(none)> | 2009-06-11 21:02:42 +0200 |
commit | ae49e807951d5e26767bc55d1dc29671c596c450 (patch) | |
tree | fca4fedd8797c45b1f30299da49ebf3b5a982ec1 /include/asm-generic/vga.h | |
parent | asm-generic: add generic versions of common headers (diff) | |
download | linux-ae49e807951d5e26767bc55d1dc29671c596c450.tar.xz linux-ae49e807951d5e26767bc55d1dc29671c596c450.zip |
asm-generic: add legacy I/O header files
The dma.h, hw_irq.h, serial.h and timex.h files originally
described PC-style i8237, i8259A, i8250, i8253 and i8255 chips
as well as the VGA style text mode graphics.
Modern architectures live happily without these specific
interfaces, but a few definitions from these headers keep
getting used in common code.
The new generic headers are what most architectures use
anyway nowadays, just implementing the minimal definitions.
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic/vga.h')
-rw-r--r-- | include/asm-generic/vga.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-generic/vga.h b/include/asm-generic/vga.h new file mode 100644 index 000000000000..36c8ff52016b --- /dev/null +++ b/include/asm-generic/vga.h @@ -0,0 +1,24 @@ +/* + * Access to VGA videoram + * + * (c) 1998 Martin Mares <mj@ucw.cz> + */ +#ifndef __ASM_GENERIC_VGA_H +#define __ASM_GENERIC_VGA_H + +/* + * On most architectures that support VGA, we can just + * recalculate addresses and then access the videoram + * directly without any black magic. + * + * Everyone else needs to ioremap the address and use + * proper I/O accesses. + */ +#ifndef VGA_MAP_MEM +#define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x) +#endif + +#define vga_readb(x) (*(x)) +#define vga_writeb(x, y) (*(y) = (x)) + +#endif /* _ASM_GENERIC_VGA_H */ |