summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2015-01-04 04:09:55 +1100
committerEdward O'Callaghan <eocallaghan@alterapraxis.com>2015-01-04 13:47:26 +0100
commit24fb03e767d3c81184e4a6ea80a31f62b4edac36 (patch)
treeee8f67ddd0f856a220c4f33bc00cb2e26b7deec1
parent74834e075844e8f7c42635974ac873fddafd419b (diff)
superio/nsc/pc87360: Use link-time symbol over .c includes
Change-Id: Id6d9efc93fdaff63dcaab50712ac9be35ccb42a7 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/8053 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
-rw-r--r--src/mainboard/arima/hdama/romstage.c2
-rw-r--r--src/mainboard/hp/e_vectra_p2706t/romstage.c2
-rw-r--r--src/superio/nsc/pc87360/Makefile.inc1
-rw-r--r--src/superio/nsc/pc87360/early_serial.c4
-rw-r--r--src/superio/nsc/pc87360/pc87360.h11
-rw-r--r--src/superio/nsc/pc87360/superio.c1
6 files changed, 14 insertions, 7 deletions
diff --git a/src/mainboard/arima/hdama/romstage.c b/src/mainboard/arima/hdama/romstage.c
index 3c7eb585a5..137d3ebede 100644
--- a/src/mainboard/arima/hdama/romstage.c
+++ b/src/mainboard/arima/hdama/romstage.c
@@ -12,7 +12,7 @@
#include "lib/delay.c"
#include "northbridge/amd/amdk8/reset_test.c"
#include "northbridge/amd/amdk8/debug.c"
-#include "superio/nsc/pc87360/early_serial.c"
+#include <superio/nsc/pc87360/pc87360.h>
#include "cpu/x86/bist.h"
#include "northbridge/amd/amdk8/setup_resource_map.c"
#include <spd.h>
diff --git a/src/mainboard/hp/e_vectra_p2706t/romstage.c b/src/mainboard/hp/e_vectra_p2706t/romstage.c
index baa19954f8..f54e0e85aa 100644
--- a/src/mainboard/hp/e_vectra_p2706t/romstage.c
+++ b/src/mainboard/hp/e_vectra_p2706t/romstage.c
@@ -25,7 +25,7 @@
#include <stdlib.h>
#include <console/console.h>
/* TODO: It's a PC87364 actually! */
-#include "superio/nsc/pc87360/early_serial.c"
+#include <superio/nsc/pc87360/pc87360.h>
/* TODO: It's i810E actually! */
#include "northbridge/intel/i82810/raminit.h"
#include "cpu/x86/bist.h"
diff --git a/src/superio/nsc/pc87360/Makefile.inc b/src/superio/nsc/pc87360/Makefile.inc
index 579b14ef17..cb504f797a 100644
--- a/src/superio/nsc/pc87360/Makefile.inc
+++ b/src/superio/nsc/pc87360/Makefile.inc
@@ -19,4 +19,5 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
+romstage-$(CONFIG_SUPERIO_NSC_PC87360) += early_serial.c
ramstage-$(CONFIG_SUPERIO_NSC_PC87360) += superio.c
diff --git a/src/superio/nsc/pc87360/early_serial.c b/src/superio/nsc/pc87360/early_serial.c
index 3deac3b431..2790df2d23 100644
--- a/src/superio/nsc/pc87360/early_serial.c
+++ b/src/superio/nsc/pc87360/early_serial.c
@@ -20,9 +20,11 @@
*/
#include <arch/io.h>
+#include <device/pnp.h>
+#include <stdint.h>
#include "pc87360.h"
-static void pc87360_enable_serial(pnp_devfn_t dev, u16 iobase)
+void pc87360_enable_serial(pnp_devfn_t dev, u16 iobase)
{
pnp_set_logical_device(dev);
pnp_set_enable(dev, 0);
diff --git a/src/superio/nsc/pc87360/pc87360.h b/src/superio/nsc/pc87360/pc87360.h
index 9843984b3b..f006943ab7 100644
--- a/src/superio/nsc/pc87360/pc87360.h
+++ b/src/superio/nsc/pc87360/pc87360.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef SUPERIO_NSC_PC87360_PC87360_H
-#define SUPERIO_NSC_PC87360_PC87360_H
+#ifndef SUPERIO_NSC_PC87360_H
+#define SUPERIO_NSC_PC87360_H
#define PC87360_FDC 0x00 /* Floppy */
#define PC87360_PP 0x01 /* Parallel port */
@@ -34,4 +34,9 @@
#define PC87360_FSCM 0x09
#define PC87360_WDT 0x0A
-#endif
+#include <arch/io.h>
+#include <stdint.h>
+
+void pc87360_enable_serial(pnp_devfn_t dev, u16 iobase);
+
+#endif /* SUPERIO_NSC_PC87360_H */
diff --git a/src/superio/nsc/pc87360/superio.c b/src/superio/nsc/pc87360/superio.c
index 58e08023ab..5706014b34 100644
--- a/src/superio/nsc/pc87360/superio.c
+++ b/src/superio/nsc/pc87360/superio.c
@@ -30,7 +30,6 @@
static void init(struct device *dev)
{
-
if (!dev->enabled)
return;