vga: removed inclusion of .c files
authorVikram Narayanan <vikram186@gmail.com>
Wed, 25 Jan 2012 15:10:40 +0000 (20:40 +0530)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Fri, 27 Jan 2012 19:07:00 +0000 (20:07 +0100)
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>
src/pc80/vga/Makefile.inc
src/pc80/vga/vga.c
src/pc80/vga/vga.h [new file with mode: 0644]
src/pc80/vga/vga_font_8x16.c
src/pc80/vga/vga_palette.c

index bc6808407337684271764af18a5045ca4cd41640..0ca7896686c08b767e7877fa3558c6d014b91a5d 100644 (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
index f87ba6663521acacf11212f7234ce94405615d93..9d640419bb383133fbe6f3917e6cc7ddd15bda47 100644 (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)
 {
diff --git a/src/pc80/vga/vga.h b/src/pc80/vga/vga.h
new file mode 100644 (file)
index 0000000..1e6e750
--- /dev/null
@@ -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 */
index 2bcaae4439ea344f3c0717226006245b033c65b2..d98bbeec84e2902d51419ff857b970398ec6684e 100644 (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       */
index 01c90309cc2cf65316fcff32176fbd0f9f00d676..5f6972890bf92b82336bf0a799f7faa60ef2cdd8 100644 (file)
@@ -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 */
 };
+