summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2017-08-18 17:32:19 -0500
committerMatt DeVillier <matt.devillier@gmail.com>2017-10-26 04:06:03 +0000
commit435299461f4e6c061898866435b48cd9883d5f74 (patch)
tree29db023320577959bfaa7ea05021707fa7e950fe
parentf5e8fe5d95844cafc100b409cea1f15e62a51e9c (diff)
downloadcoreboot-435299461f4e6c061898866435b48cd9883d5f74.tar.xz
purism/librem13v2: convert to variant setup
Convert the Purism Librem13v2 board to a variant setup, in preparation of adding the librem15v3 as a new variant. The 13v2 and 15v3 are nearly identical, so this minimizes new code to add support for the latter. Change-Id: I5d648cdb8f63c03de5474253203b3d0853673294 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/22047 Reviewed-by: Youness Alaoui <snifikino@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/purism/librem_skl/Kconfig (renamed from src/mainboard/purism/librem13v2/Kconfig)28
-rw-r--r--src/mainboard/purism/librem_skl/Kconfig.name (renamed from src/mainboard/purism/librem13v2/Kconfig.name)1
-rw-r--r--src/mainboard/purism/librem_skl/Makefile.inc (renamed from src/mainboard/purism/librem13v2/Makefile.inc)2
-rw-r--r--src/mainboard/purism/librem_skl/acpi/ec.asl (renamed from src/mainboard/purism/librem13v2/acpi/ec.asl)0
-rw-r--r--src/mainboard/purism/librem_skl/acpi/mainboard.asl (renamed from src/mainboard/purism/librem13v2/acpi/mainboard.asl)0
-rw-r--r--src/mainboard/purism/librem_skl/acpi/superio.asl (renamed from src/mainboard/purism/librem13v2/acpi/superio.asl)0
-rw-r--r--src/mainboard/purism/librem_skl/acpi_tables.c (renamed from src/mainboard/purism/librem13v2/acpi_tables.c)0
-rw-r--r--src/mainboard/purism/librem_skl/board_info.txt8
-rw-r--r--src/mainboard/purism/librem_skl/dsdt.asl (renamed from src/mainboard/purism/librem13v2/dsdt.asl)0
-rw-r--r--src/mainboard/purism/librem_skl/hda_verb.c (renamed from src/mainboard/purism/librem13v2/hda_verb.c)0
-rw-r--r--src/mainboard/purism/librem_skl/hda_verb.h (renamed from src/mainboard/purism/librem13v2/hda_verb.h)0
-rw-r--r--src/mainboard/purism/librem_skl/mainboard.c (renamed from src/mainboard/purism/librem13v2/mainboard.c)0
-rw-r--r--src/mainboard/purism/librem_skl/pei_data.c (renamed from src/mainboard/purism/librem13v2/pei_data.c)0
-rw-r--r--src/mainboard/purism/librem_skl/pei_data.h (renamed from src/mainboard/purism/librem13v2/pei_data.h)0
-rw-r--r--src/mainboard/purism/librem_skl/ramstage.c (renamed from src/mainboard/purism/librem13v2/ramstage.c)2
-rw-r--r--src/mainboard/purism/librem_skl/romstage.c (renamed from src/mainboard/purism/librem13v2/romstage.c)0
-rw-r--r--src/mainboard/purism/librem_skl/variants/librem13v2/board_info.txt (renamed from src/mainboard/purism/librem13v2/board_info.txt)0
-rw-r--r--src/mainboard/purism/librem_skl/variants/librem13v2/devicetree.cb (renamed from src/mainboard/purism/librem13v2/devicetree.cb)0
-rw-r--r--src/mainboard/purism/librem_skl/variants/librem13v2/include/variant/gpio.h (renamed from src/mainboard/purism/librem13v2/gpio.h)0
19 files changed, 32 insertions, 9 deletions
diff --git a/src/mainboard/purism/librem13v2/Kconfig b/src/mainboard/purism/librem_skl/Kconfig
index 5a279551a7..de6b167f46 100644
--- a/src/mainboard/purism/librem13v2/Kconfig
+++ b/src/mainboard/purism/librem_skl/Kconfig
@@ -1,7 +1,5 @@
-if BOARD_PURISM_LIBREM13_V2
-
-config BOARD_SPECIFIC_OPTIONS # dummy
- def_bool y
+config BOARD_PURISM_BASEBOARD_LIBREM_SKL
+ def_bool n
select SYSTEM_TYPE_LAPTOP
select BOARD_ROMSIZE_KB_16384
select HAVE_ACPI_RESUME
@@ -11,25 +9,39 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select SERIRQ_CONTINUOUS_MODE
select MAINBOARD_USES_FSP2_0
+if BOARD_PURISM_BASEBOARD_LIBREM_SKL
+
config IRQ_SLOT_COUNT
int
default 18
+config VARIANT_DIR
+ string
+ default "librem13v2" if BOARD_PURISM_LIBREM13_V2
+
+config MAINBOARD_VENDOR
+ string
+ default "Purism"
+
config MAINBOARD_FAMILY
string
- default "Librem 13"
+ default "Librem 13" if BOARD_PURISM_LIBREM13_V2
config MAINBOARD_PART_NUMBER
string
- default "Librem 13 v2"
+ default "Librem 13 v2" if BOARD_PURISM_LIBREM13_V2
config MAINBOARD_VERSION
string
- default "2.0"
+ default "2.0" if BOARD_PURISM_LIBREM13_V2
config MAINBOARD_DIR
string
- default "purism/librem13v2"
+ default "purism/librem_skl"
+
+config DEVICETREE
+ string
+ default "variants/librem13v2/devicetree.cb" if BOARD_PURISM_LIBREM13_V2
config MAX_CPUS
int
diff --git a/src/mainboard/purism/librem13v2/Kconfig.name b/src/mainboard/purism/librem_skl/Kconfig.name
index 838f2b2ddf..06fa3728f4 100644
--- a/src/mainboard/purism/librem13v2/Kconfig.name
+++ b/src/mainboard/purism/librem_skl/Kconfig.name
@@ -1,2 +1,3 @@
config BOARD_PURISM_LIBREM13_V2
bool "Librem 13 v2"
+ select BOARD_PURISM_BASEBOARD_LIBREM_SKL
diff --git a/src/mainboard/purism/librem13v2/Makefile.inc b/src/mainboard/purism/librem_skl/Makefile.inc
index 5a7131f1ba..18c9ad6520 100644
--- a/src/mainboard/purism/librem13v2/Makefile.inc
+++ b/src/mainboard/purism/librem_skl/Makefile.inc
@@ -18,3 +18,5 @@ romstage-y += pei_data.c
ramstage-y += pei_data.c
ramstage-y += ramstage.c
ramstage-y += hda_verb.c
+
+CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
diff --git a/src/mainboard/purism/librem13v2/acpi/ec.asl b/src/mainboard/purism/librem_skl/acpi/ec.asl
index 4215213737..4215213737 100644
--- a/src/mainboard/purism/librem13v2/acpi/ec.asl
+++ b/src/mainboard/purism/librem_skl/acpi/ec.asl
diff --git a/src/mainboard/purism/librem13v2/acpi/mainboard.asl b/src/mainboard/purism/librem_skl/acpi/mainboard.asl
index f0b2c1d046..f0b2c1d046 100644
--- a/src/mainboard/purism/librem13v2/acpi/mainboard.asl
+++ b/src/mainboard/purism/librem_skl/acpi/mainboard.asl
diff --git a/src/mainboard/purism/librem13v2/acpi/superio.asl b/src/mainboard/purism/librem_skl/acpi/superio.asl
index 92c272e4b6..92c272e4b6 100644
--- a/src/mainboard/purism/librem13v2/acpi/superio.asl
+++ b/src/mainboard/purism/librem_skl/acpi/superio.asl
diff --git a/src/mainboard/purism/librem13v2/acpi_tables.c b/src/mainboard/purism/librem_skl/acpi_tables.c
index e69de29bb2..e69de29bb2 100644
--- a/src/mainboard/purism/librem13v2/acpi_tables.c
+++ b/src/mainboard/purism/librem_skl/acpi_tables.c
diff --git a/src/mainboard/purism/librem_skl/board_info.txt b/src/mainboard/purism/librem_skl/board_info.txt
new file mode 100644
index 0000000000..afc4244f9c
--- /dev/null
+++ b/src/mainboard/purism/librem_skl/board_info.txt
@@ -0,0 +1,8 @@
+Vendor name: Purism
+Board name: Librem Skylake baseboard
+Category: laptop
+ROM package: SOIC8
+ROM protocol: SPI
+ROM socketed: n
+Flashrom support: y
+Release year: 2017
diff --git a/src/mainboard/purism/librem13v2/dsdt.asl b/src/mainboard/purism/librem_skl/dsdt.asl
index b1f6a54124..b1f6a54124 100644
--- a/src/mainboard/purism/librem13v2/dsdt.asl
+++ b/src/mainboard/purism/librem_skl/dsdt.asl
diff --git a/src/mainboard/purism/librem13v2/hda_verb.c b/src/mainboard/purism/librem_skl/hda_verb.c
index e8eecdf449..e8eecdf449 100644
--- a/src/mainboard/purism/librem13v2/hda_verb.c
+++ b/src/mainboard/purism/librem_skl/hda_verb.c
diff --git a/src/mainboard/purism/librem13v2/hda_verb.h b/src/mainboard/purism/librem_skl/hda_verb.h
index 660ad0c10c..660ad0c10c 100644
--- a/src/mainboard/purism/librem13v2/hda_verb.h
+++ b/src/mainboard/purism/librem_skl/hda_verb.h
diff --git a/src/mainboard/purism/librem13v2/mainboard.c b/src/mainboard/purism/librem_skl/mainboard.c
index 37a7a01132..37a7a01132 100644
--- a/src/mainboard/purism/librem13v2/mainboard.c
+++ b/src/mainboard/purism/librem_skl/mainboard.c
diff --git a/src/mainboard/purism/librem13v2/pei_data.c b/src/mainboard/purism/librem_skl/pei_data.c
index 0be917d3c7..0be917d3c7 100644
--- a/src/mainboard/purism/librem13v2/pei_data.c
+++ b/src/mainboard/purism/librem_skl/pei_data.c
diff --git a/src/mainboard/purism/librem13v2/pei_data.h b/src/mainboard/purism/librem_skl/pei_data.h
index 320d9803d1..320d9803d1 100644
--- a/src/mainboard/purism/librem13v2/pei_data.h
+++ b/src/mainboard/purism/librem_skl/pei_data.h
diff --git a/src/mainboard/purism/librem13v2/ramstage.c b/src/mainboard/purism/librem_skl/ramstage.c
index 94f8071340..15912cf862 100644
--- a/src/mainboard/purism/librem13v2/ramstage.c
+++ b/src/mainboard/purism/librem_skl/ramstage.c
@@ -15,7 +15,7 @@
*/
#include <soc/ramstage.h>
-#include "gpio.h"
+#include <variant/gpio.h>
void mainboard_silicon_init_params(FSP_SIL_UPD *params)
{
diff --git a/src/mainboard/purism/librem13v2/romstage.c b/src/mainboard/purism/librem_skl/romstage.c
index 48db885075..48db885075 100644
--- a/src/mainboard/purism/librem13v2/romstage.c
+++ b/src/mainboard/purism/librem_skl/romstage.c
diff --git a/src/mainboard/purism/librem13v2/board_info.txt b/src/mainboard/purism/librem_skl/variants/librem13v2/board_info.txt
index fb0dd0bec8..fb0dd0bec8 100644
--- a/src/mainboard/purism/librem13v2/board_info.txt
+++ b/src/mainboard/purism/librem_skl/variants/librem13v2/board_info.txt
diff --git a/src/mainboard/purism/librem13v2/devicetree.cb b/src/mainboard/purism/librem_skl/variants/librem13v2/devicetree.cb
index 1fc19a5675..1fc19a5675 100644
--- a/src/mainboard/purism/librem13v2/devicetree.cb
+++ b/src/mainboard/purism/librem_skl/variants/librem13v2/devicetree.cb
diff --git a/src/mainboard/purism/librem13v2/gpio.h b/src/mainboard/purism/librem_skl/variants/librem13v2/include/variant/gpio.h
index 148e40b279..148e40b279 100644
--- a/src/mainboard/purism/librem13v2/gpio.h
+++ b/src/mainboard/purism/librem_skl/variants/librem13v2/include/variant/gpio.h