[coreboot-gerrit] New patch to review for coreboot: c9f5fb4 superio/nsc/pc87309: Avoid .c includes in mainboard

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Thu May 29 06:51:13 CEST 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5880

-gerrit

commit c9f5fb41e5ffaf008e1627f66e215cff41e3526a
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Thu May 29 14:43:39 2014 +1000

    superio/nsc/pc87309: Avoid .c includes in mainboard
    
    Make superio romstage component link-time symbols.
    
    Change-Id: Icde27465a05946498ff7b8f1aaa7a9e8ba074272
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/mainboard/tyan/s1846/romstage.c    |  2 +-
 src/superio/nsc/pc87309/Makefile.inc   |  2 +-
 src/superio/nsc/pc87309/early_serial.c |  3 ++-
 src/superio/nsc/pc87309/pc87309.h      | 11 ++++++++---
 4 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/mainboard/tyan/s1846/romstage.c b/src/mainboard/tyan/s1846/romstage.c
index 8e901b2..bbd63ee 100644
--- a/src/mainboard/tyan/s1846/romstage.c
+++ b/src/mainboard/tyan/s1846/romstage.c
@@ -30,7 +30,7 @@
 #include "drivers/pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/bist.h"
-#include "superio/nsc/pc87309/early_serial.c"
+#include <superio/nsc/pc87309/pc87309.h>
 #include <lib.h>
 
 #define SERIAL_DEV PNP_DEV(0x2e, PC87309_SP1)
diff --git a/src/superio/nsc/pc87309/Makefile.inc b/src/superio/nsc/pc87309/Makefile.inc
index 145910f..b139680 100644
--- a/src/superio/nsc/pc87309/Makefile.inc
+++ b/src/superio/nsc/pc87309/Makefile.inc
@@ -18,5 +18,5 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 ##
 
+romstage-$(CONFIG_SUPERIO_NSC_PC87309) += early_serial.c
 ramstage-$(CONFIG_SUPERIO_NSC_PC87309) += superio.c
-
diff --git a/src/superio/nsc/pc87309/early_serial.c b/src/superio/nsc/pc87309/early_serial.c
index 131f0aa..6e48e0c 100644
--- a/src/superio/nsc/pc87309/early_serial.c
+++ b/src/superio/nsc/pc87309/early_serial.c
@@ -19,9 +19,10 @@
  */
 
 #include <arch/io.h>
+#include <device/pnp_def.h>
 #include "pc87309.h"
 
-static void pc87309_enable_serial(device_t dev, u16 iobase)
+void pc87309_enable_serial(device_t dev, u16 iobase)
 {
 	pnp_set_logical_device(dev);
 	pnp_set_enable(dev, 0);
diff --git a/src/superio/nsc/pc87309/pc87309.h b/src/superio/nsc/pc87309/pc87309.h
index 396aa78..5f39b6e 100644
--- a/src/superio/nsc/pc87309/pc87309.h
+++ b/src/superio/nsc/pc87309/pc87309.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef SUPERIO_NSC_PC87309_PC87309_H
-#define SUPERIO_NSC_PC87309_PC87309_H
+#ifndef SUPERIO_NSC_PC87309_H
+#define SUPERIO_NSC_PC87309_H
 
 /* Datasheet: PC87309 SuperI/O Plug and Play Compatible Chip. */
 
@@ -31,4 +31,9 @@
 #define PC87309_KBCM 0x05	/* Mouse */
 #define PC87309_KBCK 0x06	/* Keyboard */
 
-#endif
+#include <arch/io.h>
+#include <stdint.h>
+
+void pc87309_enable_serial(device_t dev, u16 iobase);
+
+#endif /* SUPERIO_NSC_PC87309_H */



More information about the coreboot-gerrit mailing list