From fc4e8550afc5aab4af7801e2e008a8712f8c7795 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sun, 4 Jan 2015 16:05:59 +1100 Subject: superio/nsc/pc97317: Use link-time symbols over .c inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia45bc7a880d0dab57c56a0452858cd26626f09df Signed-off-by: Edward O'Callaghan Reviewed-on: http://review.coreboot.org/8076 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/mainboard/compaq/deskpro_en_sff_p600/romstage.c | 2 +- src/superio/nsc/pc97317/Makefile.inc | 1 + src/superio/nsc/pc97317/early_serial.c | 4 +++- src/superio/nsc/pc97317/pc97317.h | 11 ++++++++--- src/superio/nsc/pc97317/superio.c | 1 - 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/mainboard/compaq/deskpro_en_sff_p600/romstage.c b/src/mainboard/compaq/deskpro_en_sff_p600/romstage.c index feccfb7efe..cfda5dbeb0 100644 --- a/src/mainboard/compaq/deskpro_en_sff_p600/romstage.c +++ b/src/mainboard/compaq/deskpro_en_sff_p600/romstage.c @@ -30,7 +30,7 @@ #include "lib/delay.c" #include "cpu/x86/bist.h" /* FIXME: This should be PC97307 (but it's buggy at the moment)! */ -#include "superio/nsc/pc97317/early_serial.c" +#include #include /* FIXME: This should be PC97307 (but it's buggy at the moment)! */ diff --git a/src/superio/nsc/pc97317/Makefile.inc b/src/superio/nsc/pc97317/Makefile.inc index c8f354c667..6d729cf083 100644 --- a/src/superio/nsc/pc97317/Makefile.inc +++ b/src/superio/nsc/pc97317/Makefile.inc @@ -18,4 +18,5 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +romstage-$(CONFIG_SUPERIO_NSC_PC97317) += early_serial.c ramstage-$(CONFIG_SUPERIO_NSC_PC97317) += superio.c diff --git a/src/superio/nsc/pc97317/early_serial.c b/src/superio/nsc/pc97317/early_serial.c index ad43010838..f9bc69e280 100644 --- a/src/superio/nsc/pc97317/early_serial.c +++ b/src/superio/nsc/pc97317/early_serial.c @@ -19,13 +19,15 @@ */ #include +#include +#include #include "pc97317.h" #define PM_DEV PNP_DEV(0x2e, PC97317_PM) #define PM_BASE 0xe8 /* The PC97317 needs clocks to be set up before the serial port will operate. */ -static void pc97317_enable_serial(pnp_devfn_t dev, u16 iobase) +void pc97317_enable_serial(pnp_devfn_t dev, u16 iobase) { /* Set base address of power management unit. */ pnp_set_logical_device(PM_DEV); diff --git a/src/superio/nsc/pc97317/pc97317.h b/src/superio/nsc/pc97317/pc97317.h index 8b57fc95b5..6938cb419d 100644 --- a/src/superio/nsc/pc97317/pc97317.h +++ b/src/superio/nsc/pc97317/pc97317.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef SUPERIO_NSC_PC97317_PC97317_H -#define SUPERIO_NSC_PC97317_PC97317_H +#ifndef SUPERIO_NSC_PC97317_H +#define SUPERIO_NSC_PC97317_H #define PC97317_KBCK 0x00 /* Keyboard */ #define PC97317_KBCM 0x01 /* Mouse */ @@ -31,4 +31,9 @@ #define PC97317_GPIO 0x07 #define PC97317_PM 0x08 /* Power Management */ -#endif +#include +#include + +void pc97317_enable_serial(pnp_devfn_t dev, u16 iobase); + +#endif /* SUPERIO_NSC_PC97317_H */ diff --git a/src/superio/nsc/pc97317/superio.c b/src/superio/nsc/pc97317/superio.c index b73dc7b0d5..25b6162c71 100644 --- a/src/superio/nsc/pc97317/superio.c +++ b/src/superio/nsc/pc97317/superio.c @@ -28,7 +28,6 @@ static void init(struct device *dev) { - if (!dev->enabled) return; -- cgit v1.2.3