/* * linux/drivers/video/vga16.c -- VGA 16-color framebuffer driver * * Copyright 1999 Ben Pfaff <pfaffben@debian.org> and Petr Vandrovec <VANDROVE@vc.cvut.cz> * Based on VGA info at http://www.goodnet.com/~tinara/FreeVGA/home.htm * Based on VESA framebuffer (c) 1998 Gerd Knorr <kraxel@goldbach.in-berlin.de> * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this * archive for more details. */#include<linux/module.h>#include<linux/kernel.h>#include<linux/errno.h>#include<linux/string.h>#include<linux/mm.h>#include<linux/delay.h>#include<linux/fb.h>#include<linux/ioport.h>#include<linux/init.h>#include<linux/platform_device.h>#include<linux/screen_info.h>#include<asm/io.h>#include<video/vga.h>#define VGA_FB_PHYS 0xA0000#define VGA_FB_PHYS_LEN 65536#define MODE_SKIP4 1#define MODE_8BPP 2#define MODE_CFB 4#define MODE_TEXT 8/* --------------------------------------------------------------------- *//* * card parameters */structvga16fb_par{/* structure holding original VGA register settings when the screen is blanked */struct{unsignedcharSeqCtrlIndex;/* Sequencer Index reg. */unsignedcharCrtCtrlIndex;/* CRT-Contr. Index reg. */unsignedcharCrtMiscIO;/* Miscellaneous register */unsignedcharHorizontalTotal;/* CRT-Controller:00h */unsignedcharHorizDisplayEnd;/* CRT-Controller:01h */unsignedcharStartHorizRetrace;/* CRT-Controller:04h */unsignedcharEndHorizRetrace;/* CRT-Controller:05h */unsignedcharOverflow;/* CRT-Controller:07h */unsignedcharStartVertRetrace;/* CRT-Controller:10h */unsignedcharEndVertRetrace;/* CRT-Controller:11h */unsignedcharModeControl;/* CRT-Controller:17h */unsigned