From a5b10417e41267e34126b806ae7653c488217ad5 Mon Sep 17 00:00:00 2001 From: Barnali Sarkar Date: Mon, 28 Nov 2016 14:53:12 +0530 Subject: [PATCH] mb/intel/kblrvp: Add Variant board support for KBLRVP Add support of Variant board model for existing intel/kblrvp, since there might be more RVP board supports under intel/kblrvp. Existing is for KBL RVP3 board. BUG=none BRANCH=none TEST=Built and boot Kaby Lake RVP3 Change-Id: I041a07a273dbb77e422d48591f06b5f1011cd9f7 Signed-off-by: Barnali Sarkar Reviewed-on: https://review.coreboot.org/17630 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/Kconfig | 2 +- src/mainboard/intel/kblrvp/Kconfig | 8 ++++++++ src/mainboard/intel/kblrvp/Makefile.inc | 3 +++ src/mainboard/intel/kblrvp/acpi/ec.asl | 2 +- src/mainboard/intel/kblrvp/acpi/mainboard.asl | 2 +- src/mainboard/intel/kblrvp/bootblock.c | 2 +- src/mainboard/intel/kblrvp/mainboard.c | 2 +- src/mainboard/intel/kblrvp/ramstage.c | 2 +- src/mainboard/intel/kblrvp/smihandler.c | 2 +- src/mainboard/intel/kblrvp/spd/spd.h | 3 +-- .../intel/kblrvp/{ => variants/rvp3}/devicetree.cb | 0 .../kblrvp/{ => variants/rvp3/include/variant}/gpio.h | 0 12 files changed, 19 insertions(+), 9 deletions(-) rename src/mainboard/intel/kblrvp/{ => variants/rvp3}/devicetree.cb (100%) rename src/mainboard/intel/kblrvp/{ => variants/rvp3/include/variant}/gpio.h (100%) diff --git a/src/Kconfig b/src/Kconfig index 77d13d1db8..5cd02542ea 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -326,7 +326,7 @@ config GENERIC_SPD_BIN config DIMM_MAX int - default 2 + default 4 depends on GENERIC_SPD_BIN help Total number of memory DIMM slots available on motherboard. diff --git a/src/mainboard/intel/kblrvp/Kconfig b/src/mainboard/intel/kblrvp/Kconfig index e53c4465db..10752e76f9 100644 --- a/src/mainboard/intel/kblrvp/Kconfig +++ b/src/mainboard/intel/kblrvp/Kconfig @@ -48,6 +48,10 @@ config MAINBOARD_DIR string default "intel/kblrvp" +config VARIANT_DIR + string + default "rvp3" + config MAINBOARD_PART_NUMBER string default "Kblrvp" @@ -68,4 +72,8 @@ config GBB_HWID string depends on CHROMEOS default "KBLRVP TEST 8819" + +config DEVICETREE + string + default "variants/$(CONFIG_VARIANT_DIR)/devicetree.cb" endif diff --git a/src/mainboard/intel/kblrvp/Makefile.inc b/src/mainboard/intel/kblrvp/Makefile.inc index 68c87c9ca6..7ddfb9fa91 100644 --- a/src/mainboard/intel/kblrvp/Makefile.inc +++ b/src/mainboard/intel/kblrvp/Makefile.inc @@ -32,3 +32,6 @@ ramstage-y += mainboard.c ramstage-y += ramstage.c smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c + +subdirs-y += variants/$(VARIANT_DIR) +CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include diff --git a/src/mainboard/intel/kblrvp/acpi/ec.asl b/src/mainboard/intel/kblrvp/acpi/ec.asl index 7d7ff2ffa8..01fa75c6ff 100644 --- a/src/mainboard/intel/kblrvp/acpi/ec.asl +++ b/src/mainboard/intel/kblrvp/acpi/ec.asl @@ -15,7 +15,7 @@ /* mainboard configuration */ #include "../ec.h" -#include "../gpio.h" +#include /* Enable EC backed ALS device in ACPI */ #define EC_ENABLE_ALS_DEVICE diff --git a/src/mainboard/intel/kblrvp/acpi/mainboard.asl b/src/mainboard/intel/kblrvp/acpi/mainboard.asl index 5d2b3071b5..4764372778 100644 --- a/src/mainboard/intel/kblrvp/acpi/mainboard.asl +++ b/src/mainboard/intel/kblrvp/acpi/mainboard.asl @@ -14,7 +14,7 @@ * GNU General Public License for more details. */ -#include "../gpio.h" +#include #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC) Scope (\_SB) diff --git a/src/mainboard/intel/kblrvp/bootblock.c b/src/mainboard/intel/kblrvp/bootblock.c index 627b4e8b08..dde7e8612a 100644 --- a/src/mainboard/intel/kblrvp/bootblock.c +++ b/src/mainboard/intel/kblrvp/bootblock.c @@ -15,7 +15,7 @@ #include #include -#include "gpio.h" +#include static void early_config_gpio(void) { diff --git a/src/mainboard/intel/kblrvp/mainboard.c b/src/mainboard/intel/kblrvp/mainboard.c index cd6c3f90be..652af732de 100644 --- a/src/mainboard/intel/kblrvp/mainboard.c +++ b/src/mainboard/intel/kblrvp/mainboard.c @@ -24,7 +24,7 @@ #include #include #include "ec.h" -#include "gpio.h" +#include static void mainboard_init(device_t dev) { diff --git a/src/mainboard/intel/kblrvp/ramstage.c b/src/mainboard/intel/kblrvp/ramstage.c index bcd72bc41e..3a48396d22 100644 --- a/src/mainboard/intel/kblrvp/ramstage.c +++ b/src/mainboard/intel/kblrvp/ramstage.c @@ -17,7 +17,7 @@ #include #include #include -#include "gpio.h" +#include void mainboard_silicon_init_params(FSP_SIL_UPD *params) { diff --git a/src/mainboard/intel/kblrvp/smihandler.c b/src/mainboard/intel/kblrvp/smihandler.c index 81aaf23b64..9ecc43aaff 100644 --- a/src/mainboard/intel/kblrvp/smihandler.c +++ b/src/mainboard/intel/kblrvp/smihandler.c @@ -25,7 +25,7 @@ #include #include #include "ec.h" -#include "gpio.h" +#include int mainboard_io_trap_handler(int smif) { diff --git a/src/mainboard/intel/kblrvp/spd/spd.h b/src/mainboard/intel/kblrvp/spd/spd.h index 3ef2dd848c..c24baa07bf 100644 --- a/src/mainboard/intel/kblrvp/spd/spd.h +++ b/src/mainboard/intel/kblrvp/spd/spd.h @@ -18,8 +18,7 @@ #define MAINBOARD_SPD_H #include -#include "../gpio.h" - +#include #define RCOMP_TARGET_PARAMS 0x5 diff --git a/src/mainboard/intel/kblrvp/devicetree.cb b/src/mainboard/intel/kblrvp/variants/rvp3/devicetree.cb similarity index 100% rename from src/mainboard/intel/kblrvp/devicetree.cb rename to src/mainboard/intel/kblrvp/variants/rvp3/devicetree.cb diff --git a/src/mainboard/intel/kblrvp/gpio.h b/src/mainboard/intel/kblrvp/variants/rvp3/include/variant/gpio.h similarity index 100% rename from src/mainboard/intel/kblrvp/gpio.h rename to src/mainboard/intel/kblrvp/variants/rvp3/include/variant/gpio.h