[coreboot] Patch set updated for coreboot: cc61aab vga: removed inclusion of .c files

Vikram Narayanan (vikram186@gmail.com) gerrit at coreboot.org
Fri Jan 27 18:05:04 CET 2012


Vikram Narayanan (vikram186 at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/588

-gerrit

commit cc61aab7ee914f435b30eeaad42d93730a4eb9f6
Author: Vikram Narayanan <vikram186 at gmail.com>
Date:   Wed Jan 25 20:40:40 2012 +0530

    vga: removed inclusion of .c files
    
    Add local vga.h for prototypes.
    
    Change-Id: I5ff627c6420d4b7fd1bc9a537f406ef6d9597522
    Signed-off-by: Vikram Narayanan <vikram186 at gmail.com>
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
 src/pc80/vga/Makefile.inc    |    2 ++
 src/pc80/vga/vga.c           |    5 +----
 src/pc80/vga/vga.h           |   17 +++++++++++++++++
 src/pc80/vga/vga_font_8x16.c |   20 ++++++++++++++++++++
 src/pc80/vga/vga_palette.c   |   29 ++++++++++++++++++++++-------
 5 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/src/pc80/vga/Makefile.inc b/src/pc80/vga/Makefile.inc
index bc68084..0ca7896 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 f87ba66..9d64041 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 0000000..1e6e750
--- /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 2bcaae4..d98bbee 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 at 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 01c9030..5f69728 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 at 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 */
 };
+




More information about the coreboot mailing list