diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2015-01-04 17:21:52 +1100 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2015-01-06 01:23:31 +0100 |
commit | d76ac6349df0147b9d8f7f09f8bb80343ecfb5e6 (patch) | |
tree | d9ef8bc7e852cd55ac05d2258a4c7c11613dcf79 /src | |
parent | 3a6550d989460f9449136814a8b1f6b051a6382d (diff) | |
download | coreboot-d76ac6349df0147b9d8f7f09f8bb80343ecfb5e6.tar.xz |
superio/smsc/lpc47n207: Hook into build system
Provide proper Makefile and Kconfig components so
that this superio is built as object code. Select
superio component in mainboard Kconfig's to bring
in the link-time symbols and thereby removing the
need for .c inclusion.
N.B. The LPC47N207 Super I/O does not physically exist
on these boards. The Super I/O is found on external LPC
debug card hardware and so should really be made selectable.
However, this is beyond the scope of this specific fix, that
rids us of .c inclusions in romstage.c
Change-Id: I451c3a81c4b5beca1ed65e27467a7393d2521dae
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/8084
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/samsung/lumpy/Kconfig | 3 | ||||
-rw-r--r-- | src/mainboard/samsung/lumpy/romstage.c | 1 | ||||
-rw-r--r-- | src/mainboard/samsung/stumpy/Kconfig | 3 | ||||
-rw-r--r-- | src/mainboard/samsung/stumpy/romstage.c | 1 | ||||
-rw-r--r-- | src/superio/smsc/Kconfig | 2 | ||||
-rw-r--r-- | src/superio/smsc/Makefile.inc | 1 | ||||
-rw-r--r-- | src/superio/smsc/lpc47n207/Makefile.inc | 21 | ||||
-rw-r--r-- | src/superio/smsc/lpc47n207/early_serial.c | 6 | ||||
-rw-r--r-- | src/superio/smsc/lpc47n207/lpc47n207.h | 11 |
9 files changed, 43 insertions, 6 deletions
diff --git a/src/mainboard/samsung/lumpy/Kconfig b/src/mainboard/samsung/lumpy/Kconfig index baf0eeeb89..1b20452ff6 100644 --- a/src/mainboard/samsung/lumpy/Kconfig +++ b/src/mainboard/samsung/lumpy/Kconfig @@ -13,6 +13,9 @@ config BOARD_SPECIFIC_OPTIONS # dummy select NORTHBRIDGE_INTEL_SANDYBRIDGE select SOUTHBRIDGE_INTEL_BD82X6X select SUPERIO_SMSC_MEC1308 +# LPC47N207 selected for external LPC card +# not on board, should be made selectable. + select SUPERIO_SMSC_LPC47N207 select DRIVERS_GENERIC_IOAPIC select INTEL_INT15 select HAVE_MRC diff --git a/src/mainboard/samsung/lumpy/romstage.c b/src/mainboard/samsung/lumpy/romstage.c index b356fa81e1..8568f8428a 100644 --- a/src/mainboard/samsung/lumpy/romstage.c +++ b/src/mainboard/samsung/lumpy/romstage.c @@ -45,7 +45,6 @@ #include "gpio.h" #if CONFIG_DRIVERS_UART_8250IO #include <superio/smsc/lpc47n207/lpc47n207.h> -#include "superio/smsc/lpc47n207/early_serial.c" #endif #if CONFIG_CHROMEOS #include <vendorcode/google/chromeos/chromeos.h> diff --git a/src/mainboard/samsung/stumpy/Kconfig b/src/mainboard/samsung/stumpy/Kconfig index 17484a9eff..1b65eae8db 100644 --- a/src/mainboard/samsung/stumpy/Kconfig +++ b/src/mainboard/samsung/stumpy/Kconfig @@ -11,6 +11,9 @@ config BOARD_SPECIFIC_OPTIONS # dummy select NORTHBRIDGE_INTEL_SANDYBRIDGE select SOUTHBRIDGE_INTEL_BD82X6X select SUPERIO_ITE_IT8772F +# LPC47N207 selected for external LPC card +# not on board, should be made selectable. + select SUPERIO_SMSC_LPC47N207 select HAVE_MRC select INTEL_INT15 diff --git a/src/mainboard/samsung/stumpy/romstage.c b/src/mainboard/samsung/stumpy/romstage.c index 1462132eba..2ed185baf9 100644 --- a/src/mainboard/samsung/stumpy/romstage.c +++ b/src/mainboard/samsung/stumpy/romstage.c @@ -45,7 +45,6 @@ #include "gpio.h" #if CONFIG_DRIVERS_UART_8250IO #include <superio/smsc/lpc47n207/lpc47n207.h> -#include "superio/smsc/lpc47n207/early_serial.c" #endif #if CONFIG_CHROMEOS #include <vendorcode/google/chromeos/chromeos.h> diff --git a/src/superio/smsc/Kconfig b/src/superio/smsc/Kconfig index 6aaa1127e9..34bc60cf1d 100644 --- a/src/superio/smsc/Kconfig +++ b/src/superio/smsc/Kconfig @@ -30,6 +30,8 @@ config SUPERIO_SMSC_LPC47M10X bool config SUPERIO_SMSC_LPC47M15X bool +config SUPERIO_SMSC_LPC47N207 + bool config SUPERIO_SMSC_LPC47N217 bool config SUPERIO_SMSC_LPC47N227 diff --git a/src/superio/smsc/Makefile.inc b/src/superio/smsc/Makefile.inc index a89b6ac336..caa2c7202d 100644 --- a/src/superio/smsc/Makefile.inc +++ b/src/superio/smsc/Makefile.inc @@ -24,6 +24,7 @@ subdirs-y += lpc47b272 subdirs-y += lpc47b397 subdirs-y += lpc47m10x subdirs-y += lpc47m15x +subdirs-y += lpc47n207 subdirs-y += lpc47n217 subdirs-y += lpc47n227 subdirs-y += sio10n268 diff --git a/src/superio/smsc/lpc47n207/Makefile.inc b/src/superio/smsc/lpc47n207/Makefile.inc new file mode 100644 index 0000000000..08e1387ce4 --- /dev/null +++ b/src/superio/smsc/lpc47n207/Makefile.inc @@ -0,0 +1,21 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2014 Edward O'Callaghan <eocallaghan@alterapraxis.com> +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +romstage-$(CONFIG_SUPERIO_SMSC_LPC47N207) += early_serial.c diff --git a/src/superio/smsc/lpc47n207/early_serial.c b/src/superio/smsc/lpc47n207/early_serial.c index e2ae49da66..847fe9790f 100644 --- a/src/superio/smsc/lpc47n207/early_serial.c +++ b/src/superio/smsc/lpc47n207/early_serial.c @@ -17,6 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <arch/io.h> +#include <device/pnp.h> +#include <stdint.h> +#include <stdlib.h> +#include "lpc47n207.h" + /* * This code tries to discover the SMSC LPC47N207 superio chip which can be * connected over an LPC dongle. The chip could be bootstrap mapped to one of diff --git a/src/superio/smsc/lpc47n207/lpc47n207.h b/src/superio/smsc/lpc47n207/lpc47n207.h index 69689a4dfe..a1224656a2 100644 --- a/src/superio/smsc/lpc47n207/lpc47n207.h +++ b/src/superio/smsc/lpc47n207/lpc47n207.h @@ -17,9 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef SUPERIO_SMSC_LPC47N207_LPC47N207_H -#define SUPERIO_SMSC_LPC47N207_LPC47N207_H +#ifndef SUPERIO_SMSC_LPC47N207_H +#define SUPERIO_SMSC_LPC47N207_H -extern void try_enabling_LPC47N207_uart(void); +#include <arch/io.h> +#include <stdint.h> -#endif +void try_enabling_LPC47N207_uart(void); + +#endif /* SUPERIO_SMSC_LPC47N207_H */ |