vga: removed inclusion of .c files

Add local vga.h for prototypes.

Change-Id: I5ff627c6420d4b7fd1bc9a537f406ef6d9597522
Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/588
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Vikram Narayanan 2012-01-25 20:40:40 +05:30 committed by Stefan Reinauer
parent 976f8cc1e2
commit cc16cca2be
5 changed files with 62 additions and 11 deletions

View File

@ -1,2 +1,4 @@
ramstage-y += vga_io.c
ramstage-$(CONFIG_VGA) += vga_palette.c
ramstage-$(CONFIG_VGA) += vga_font_8x16.c
ramstage-$(CONFIG_VGA) += vga.c

View File

@ -20,6 +20,7 @@
#include <pc80/vga_io.h>
#include <string.h>
#include "vga.h"
/*
* pci io enable should've happened before
@ -69,8 +70,6 @@ vga_fb_clear(void)
memset((void *)VGA_FB, 0x00, 0x8000);
}
#include "vga_palette.c"
/*
*
*/
@ -181,8 +180,6 @@ vga_mode_set(int hdisplay, int hblankstart, int hsyncstart, int hsyncend,
vga_cr_mask(0x09, 0x00, 0x80); /* disable doublescan */
}
#include "vga_font_8x16.c"
static void
vga_font_8x16_load(void)
{

17
src/pc80/vga/vga.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef _VGA_H
#define _VGA_H
/*
* Basic palette.
*/
struct palette {
unsigned char red;
unsigned char green;
unsigned char blue;
};
extern const struct palette default_vga_palette[0x100];
extern const unsigned char vga_font_8x16[256][16];
#endif /* _VGA_H */

View File

@ -1,3 +1,23 @@
/*
* Copyright (C) 2007-2009 Luc Verhaegen <libv@skynet.be>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "vga.h"
/**********************************************/
/* */
/* Font file generated by cpi2fnt */

View File

@ -1,13 +1,27 @@
/*
* Copyright (C) 2007-2009 Luc Verhaegen <libv@skynet.be>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "vga.h"
/*
* Basic palette.
*/
struct palette {
unsigned char red;
unsigned char green;
unsigned char blue;
};
static const struct palette
const struct palette
default_vga_palette[0x100] = {
{ 0x00, 0x00, 0x00},
{ 0x00, 0x00, 0x2A},
@ -259,3 +273,4 @@ default_vga_palette[0x100] = {
{ 0x0B, 0x0C, 0x20},
/* Pad with NULL */
};