summaryrefslogtreecommitdiff
path: root/src/pc80
diff options
context:
space:
mode:
authorVikram Narayanan <vikram186@gmail.com>2012-01-25 20:40:40 +0530
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-01-27 20:07:00 +0100
commitcc16cca2be1939a731157b1b62029d99be268dc8 (patch)
tree1d018c683d807fc4f472147c4d915446be90a265 /src/pc80
parent976f8cc1e29daee35a2f92f97be59a4838949c43 (diff)
downloadcoreboot-cc16cca2be1939a731157b1b62029d99be268dc8.tar.xz
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>
Diffstat (limited to 'src/pc80')
-rw-r--r--src/pc80/vga/Makefile.inc2
-rw-r--r--src/pc80/vga/vga.c5
-rw-r--r--src/pc80/vga/vga.h17
-rw-r--r--src/pc80/vga/vga_font_8x16.c20
-rw-r--r--src/pc80/vga/vga_palette.c29
5 files changed, 62 insertions, 11 deletions
diff --git a/src/pc80/vga/Makefile.inc b/src/pc80/vga/Makefile.inc
index bc68084073..0ca7896686 100644
--- a/src/pc80/vga/Makefile.inc
+++ b/src/pc80/vga/Makefile.inc
@@ -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
diff --git a/src/pc80/vga/vga.c b/src/pc80/vga/vga.c
index f87ba66635..9d640419bb 100644
--- a/src/pc80/vga/vga.c
+++ b/src/pc80/vga/vga.c
@@ -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)
{
diff --git a/src/pc80/vga/vga.h b/src/pc80/vga/vga.h
new file mode 100644
index 0000000000..1e6e750b89
--- /dev/null
+++ b/src/pc80/vga/vga.h
@@ -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 */
diff --git a/src/pc80/vga/vga_font_8x16.c b/src/pc80/vga/vga_font_8x16.c
index 2bcaae4439..d98bbeec84 100644
--- a/src/pc80/vga/vga_font_8x16.c
+++ b/src/pc80/vga/vga_font_8x16.c
@@ -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 */
diff --git a/src/pc80/vga/vga_palette.c b/src/pc80/vga/vga_palette.c
index 01c90309cc..5f6972890b 100644
--- a/src/pc80/vga/vga_palette.c
+++ b/src/pc80/vga/vga_palette.c
@@ -1,13 +1,27 @@
/*
- * Basic palette.
+ * 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
*/
-struct palette {
- unsigned char red;
- unsigned char green;
- unsigned char blue;
-};
-static const struct palette
+#include "vga.h"
+
+/*
+ * Basic 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 */
};
+