patch-2.4.20 linux-2.4.20/include/asm-ia64/vga.h

Next file: linux-2.4.20/include/asm-m68k/apollodma.h
Previous file: linux-2.4.20/include/asm-ia64/unistd.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/include/asm-ia64/vga.h linux-2.4.20/include/asm-ia64/vga.h
@@ -1,22 +1,39 @@
+#ifndef _ASM_IA64_VGA_H
+#define _ASM_IA64_VGA_H
+
 /*
  *	Access to VGA videoram
  *
  *	(c) 1998 Martin Mares <mj@ucw.cz>
  *	(c) 1999 Asit Mallick <asit.k.mallick@intel.com>
  *	(c) 1999 Don Dugger <don.dugger@intel.com>
+ *	Copyright (C) 2002 Hewlett-Packard Co
  */
-
-#ifndef __ASM_IA64_VGA_H_
-#define __ASM_IA64_VGA_H_
-
 /*
- * On the PC, we can just recalculate addresses and then access the
- * videoram directly without any black magic.
+ * 2002/07/19	davidm@hpl.hp.com	Access frame-buffer memory via readX/writeX.
  */
 
+#include <asm/io.h>
+
+#define VT_BUF_HAVE_RW
+
 #define VGA_MAP_MEM(x)	((unsigned long) ioremap((x), 0))
 
-#define vga_readb(x)	(*(x))
-#define vga_writeb(x,y)	(*(y) = (x))
+#define vga_readb	__raw_readb
+#define vga_writeb	__raw_writeb
+
+extern inline void
+scr_writew (u16 val, volatile u16 *addr)
+{
+	/* Note: ADDR may point to normal memory.  That's OK on ia64.  */
+	__raw_writew(val, (unsigned long) addr);
+}
+
+extern inline u16
+scr_readw (volatile const u16 *addr)
+{
+	/* Note: ADDR may point to normal memory.  That's OK on ia64.  */
+	return __raw_readw((unsigned long) addr);
+}
 
-#endif /* __ASM_IA64_VGA_H_ */
+#endif /* _ASM_IA64_VGA_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)