superio/nsc/pc97317: Use link-time symbols over .c inclusion

Change-Id: Ia45bc7a880d0dab57c56a0452858cd26626f09df
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/8076
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Edward O'Callaghan
2015-01-04 16:05:59 +11:00
parent e64f5b1bcd
commit fc4e8550af
5 changed files with 13 additions and 6 deletions

View File

@@ -30,7 +30,7 @@
#include "lib/delay.c" #include "lib/delay.c"
#include "cpu/x86/bist.h" #include "cpu/x86/bist.h"
/* FIXME: This should be PC97307 (but it's buggy at the moment)! */ /* FIXME: This should be PC97307 (but it's buggy at the moment)! */
#include "superio/nsc/pc97317/early_serial.c" #include <superio/nsc/pc97317/pc97317.h>
#include <lib.h> #include <lib.h>
/* FIXME: This should be PC97307 (but it's buggy at the moment)! */ /* FIXME: This should be PC97307 (but it's buggy at the moment)! */

View File

@@ -18,4 +18,5 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## 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 ramstage-$(CONFIG_SUPERIO_NSC_PC97317) += superio.c

View File

@@ -19,13 +19,15 @@
*/ */
#include <arch/io.h> #include <arch/io.h>
#include <device/pnp.h>
#include <stdint.h>
#include "pc97317.h" #include "pc97317.h"
#define PM_DEV PNP_DEV(0x2e, PC97317_PM) #define PM_DEV PNP_DEV(0x2e, PC97317_PM)
#define PM_BASE 0xe8 #define PM_BASE 0xe8
/* The PC97317 needs clocks to be set up before the serial port will operate. */ /* 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. */ /* Set base address of power management unit. */
pnp_set_logical_device(PM_DEV); pnp_set_logical_device(PM_DEV);

View File

@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef SUPERIO_NSC_PC97317_PC97317_H #ifndef SUPERIO_NSC_PC97317_H
#define SUPERIO_NSC_PC97317_PC97317_H #define SUPERIO_NSC_PC97317_H
#define PC97317_KBCK 0x00 /* Keyboard */ #define PC97317_KBCK 0x00 /* Keyboard */
#define PC97317_KBCM 0x01 /* Mouse */ #define PC97317_KBCM 0x01 /* Mouse */
@@ -31,4 +31,9 @@
#define PC97317_GPIO 0x07 #define PC97317_GPIO 0x07
#define PC97317_PM 0x08 /* Power Management */ #define PC97317_PM 0x08 /* Power Management */
#endif #include <arch/io.h>
#include <stdint.h>
void pc97317_enable_serial(pnp_devfn_t dev, u16 iobase);
#endif /* SUPERIO_NSC_PC97317_H */

View File

@@ -28,7 +28,6 @@
static void init(struct device *dev) static void init(struct device *dev)
{ {
if (!dev->enabled) if (!dev->enabled)
return; return;