superio/nsc/pc87417: Use link-time symbols over .c inclusion
Change-Id: I2efb7ab4b69bcd127b2faf54277dc229c9dcf3ea Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/8078 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
#include "cpu/x86/lapic.h"
|
#include "cpu/x86/lapic.h"
|
||||||
#include "northbridge/amd/amdk8/reset_test.c"
|
#include "northbridge/amd/amdk8/reset_test.c"
|
||||||
#include "northbridge/amd/amdk8/debug.c"
|
#include "northbridge/amd/amdk8/debug.c"
|
||||||
#include "superio/nsc/pc87417/early_serial.c"
|
#include <superio/nsc/pc87417/pc87417.h>
|
||||||
#include "cpu/x86/bist.h"
|
#include "cpu/x86/bist.h"
|
||||||
#include "northbridge/amd/amdk8/setup_resource_map.c"
|
#include "northbridge/amd/amdk8/setup_resource_map.c"
|
||||||
#include "southbridge/broadcom/bcm5785/early_setup.c"
|
#include "southbridge/broadcom/bcm5785/early_setup.c"
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
#include "cpu/x86/lapic.h"
|
#include "cpu/x86/lapic.h"
|
||||||
#include "northbridge/amd/amdk8/reset_test.c"
|
#include "northbridge/amd/amdk8/reset_test.c"
|
||||||
#include <superio/serverengines/pilot/pilot.h>
|
#include <superio/serverengines/pilot/pilot.h>
|
||||||
#include "superio/nsc/pc87417/early_serial.c"
|
#include <superio/nsc/pc87417/pc87417.h>
|
||||||
#include "cpu/x86/bist.h"
|
#include "cpu/x86/bist.h"
|
||||||
#include "northbridge/amd/amdk8/debug.c"
|
#include "northbridge/amd/amdk8/debug.c"
|
||||||
#include "northbridge/amd/amdk8/setup_resource_map.c"
|
#include "northbridge/amd/amdk8/setup_resource_map.c"
|
||||||
|
@@ -47,7 +47,7 @@
|
|||||||
#include "cpu/x86/lapic.h"
|
#include "cpu/x86/lapic.h"
|
||||||
#include "northbridge/amd/amdfam10/reset_test.c"
|
#include "northbridge/amd/amdfam10/reset_test.c"
|
||||||
#include <superio/serverengines/pilot/pilot.h>
|
#include <superio/serverengines/pilot/pilot.h>
|
||||||
#include "superio/nsc/pc87417/early_serial.c"
|
#include <superio/nsc/pc87417/pc87417.h>
|
||||||
#include "cpu/x86/bist.h"
|
#include "cpu/x86/bist.h"
|
||||||
#include "northbridge/amd/amdfam10/debug.c"
|
#include "northbridge/amd/amdfam10/debug.c"
|
||||||
#include "southbridge/broadcom/bcm5785/early_setup.c"
|
#include "southbridge/broadcom/bcm5785/early_setup.c"
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
#include "cpu/x86/lapic.h"
|
#include "cpu/x86/lapic.h"
|
||||||
#include "northbridge/amd/amdk8/reset_test.c"
|
#include "northbridge/amd/amdk8/reset_test.c"
|
||||||
#include "northbridge/amd/amdk8/debug.c"
|
#include "northbridge/amd/amdk8/debug.c"
|
||||||
#include "superio/nsc/pc87417/early_serial.c"
|
#include <superio/nsc/pc87417/pc87417.h>
|
||||||
#include "cpu/x86/bist.h"
|
#include "cpu/x86/bist.h"
|
||||||
#include "northbridge/amd/amdk8/setup_resource_map.c"
|
#include "northbridge/amd/amdk8/setup_resource_map.c"
|
||||||
#include "southbridge/broadcom/bcm5785/early_setup.c"
|
#include "southbridge/broadcom/bcm5785/early_setup.c"
|
||||||
|
@@ -20,4 +20,6 @@
|
|||||||
## 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_PC87417) += early_init.c
|
||||||
|
romstage-$(CONFIG_SUPERIO_NSC_PC87417) += early_serial.c
|
||||||
ramstage-$(CONFIG_SUPERIO_NSC_PC87417) += superio.c
|
ramstage-$(CONFIG_SUPERIO_NSC_PC87417) += superio.c
|
||||||
|
@@ -21,25 +21,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <device/pnp.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include "pc87417.h"
|
#include "pc87417.h"
|
||||||
|
|
||||||
static void pc87417_disable_dev(pnp_devfn_t dev)
|
void pc87417_disable_dev(pnp_devfn_t dev)
|
||||||
{
|
{
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
pnp_set_enable(dev, 0);
|
pnp_set_enable(dev, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pc87417_enable_dev(pnp_devfn_t dev, u16 iobase)
|
void pc87417_enable_dev(pnp_devfn_t dev)
|
||||||
{
|
{
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
pnp_set_enable(dev, 0);
|
|
||||||
pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
|
|
||||||
pnp_set_enable(dev, 1);
|
pnp_set_enable(dev, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xbus_cfg(pnp_devfn_t dev)
|
void xbus_cfg(pnp_devfn_t dev)
|
||||||
{
|
{
|
||||||
u8 i, data;
|
u8 i;
|
||||||
u16 xbus_index;
|
u16 xbus_index;
|
||||||
|
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <device/pnp.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include "pc87417.h"
|
#include "pc87417.h"
|
||||||
|
|
||||||
void pc87417_enable_serial(pnp_devfn_t dev, u16 iobase)
|
void pc87417_enable_serial(pnp_devfn_t dev, u16 iobase)
|
||||||
@@ -30,9 +32,3 @@ void pc87417_enable_serial(pnp_devfn_t dev, u16 iobase)
|
|||||||
pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
|
pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
|
||||||
pnp_set_enable(dev, 1);
|
pnp_set_enable(dev, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pc87417_enable_dev(pnp_devfn_t dev)
|
|
||||||
{
|
|
||||||
pnp_set_logical_device(dev);
|
|
||||||
pnp_set_enable(dev, 1);
|
|
||||||
}
|
|
||||||
|
@@ -20,8 +20,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_PC87417_PC87417_H
|
#ifndef SUPERIO_NSC_PC87417_H
|
||||||
#define SUPERIO_NSC_PC87417_PC87417_H
|
#define SUPERIO_NSC_PC87417_H
|
||||||
|
|
||||||
#define PC87417_FDC 0x00 /* Floppy */
|
#define PC87417_FDC 0x00 /* Floppy */
|
||||||
#define PC87417_PP 0x01 /* Parallel Port */
|
#define PC87417_PP 0x01 /* Parallel Port */
|
||||||
@@ -114,9 +114,13 @@
|
|||||||
#define PC87417_XSCNF 0x15
|
#define PC87417_XSCNF 0x15
|
||||||
#define PC87417_XWBCNF 0x16
|
#define PC87417_XWBCNF 0x16
|
||||||
|
|
||||||
#if defined(__PRE_RAM__)
|
#include <arch/io.h>
|
||||||
void pc87417_enable_serial(pnp_devfn_t dev, u16 iobase);
|
#include <stdint.h>
|
||||||
void pc87417_enable_dev(pnp_devfn_t dev);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
void pc87417_enable_serial(pnp_devfn_t dev, u16 iobase);
|
||||||
|
void pc87417_disable_dev(pnp_devfn_t dev);
|
||||||
|
void pc87417_enable_dev(pnp_devfn_t dev);
|
||||||
|
|
||||||
|
void xbus_cfg(pnp_devfn_t dev);
|
||||||
|
|
||||||
|
#endif /* SUPERIO_NSC_PC87417_H */
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
static void init(struct device *dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user