summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/reef/Kconfig4
-rw-r--r--src/mainboard/google/reef/Makefile.inc7
-rw-r--r--src/mainboard/google/reef/acpi/mainboard.asl4
-rw-r--r--src/mainboard/google/reef/bootblock.c4
-rw-r--r--src/mainboard/google/reef/chromeos.c4
-rw-r--r--src/mainboard/google/reef/ec.c2
-rw-r--r--src/mainboard/google/reef/mainboard.c4
-rw-r--r--src/mainboard/google/reef/romstage.c2
-rw-r--r--src/mainboard/google/reef/smihandler.c4
-rw-r--r--src/mainboard/google/reef/variants/baseboard/include/baseboard/ec.h (renamed from src/mainboard/google/reef/ec.h)4
-rw-r--r--src/mainboard/google/reef/variants/baseboard/include/baseboard/gpio.h (renamed from src/mainboard/google/reef/gpio.h)8
-rw-r--r--src/mainboard/google/reef/variants/reef/include/variant/ec.h21
-rw-r--r--src/mainboard/google/reef/variants/reef/include/variant/gpio.h21
13 files changed, 71 insertions, 18 deletions
diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig
index 817fcc9596..6ef45ccde6 100644
--- a/src/mainboard/google/reef/Kconfig
+++ b/src/mainboard/google/reef/Kconfig
@@ -32,6 +32,10 @@ config MAINBOARD_DIR
string
default google/reef
+config VARIANT_DIR
+ string
+ default "reef" if BOARD_GOOGLE_REEF
+
config MAINBOARD_PART_NUMBER
string
default "Reef" if BOARD_GOOGLE_REEF
diff --git a/src/mainboard/google/reef/Makefile.inc b/src/mainboard/google/reef/Makefile.inc
index bb3dd8f0fe..f2da3794d5 100644
--- a/src/mainboard/google/reef/Makefile.inc
+++ b/src/mainboard/google/reef/Makefile.inc
@@ -11,3 +11,10 @@ ramstage-y += mainboard.c
verstage-$(CONFIG_CHROMEOS) += chromeos.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
+
+subdirs-y += variants/baseboard
+CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
+
+VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR))
+subdirs-y += variants/$(VARIANT_DIR)
+CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
diff --git a/src/mainboard/google/reef/acpi/mainboard.asl b/src/mainboard/google/reef/acpi/mainboard.asl
index 5bc82a13fe..0b2fdc8a32 100644
--- a/src/mainboard/google/reef/acpi/mainboard.asl
+++ b/src/mainboard/google/reef/acpi/mainboard.asl
@@ -13,8 +13,8 @@
* GNU General Public License for more details.
*/
-#include "../ec.h"
-#include "../gpio.h"
+#include <variant/ec.h>
+#include <variant/gpio.h>
Scope (\_SB)
{
diff --git a/src/mainboard/google/reef/bootblock.c b/src/mainboard/google/reef/bootblock.c
index 56af987467..7a767ecadf 100644
--- a/src/mainboard/google/reef/bootblock.c
+++ b/src/mainboard/google/reef/bootblock.c
@@ -16,8 +16,8 @@
#include <bootblock_common.h>
#include <soc/lpc.h>
#include <soc/gpio.h>
-#include "ec.h"
-#include "gpio.h"
+#include <variant/ec.h>
+#include <variant/gpio.h>
void bootblock_mainboard_init(void)
{
diff --git a/src/mainboard/google/reef/chromeos.c b/src/mainboard/google/reef/chromeos.c
index 5c526dc6e4..ea0f68e236 100644
--- a/src/mainboard/google/reef/chromeos.c
+++ b/src/mainboard/google/reef/chromeos.c
@@ -18,8 +18,8 @@
#include <gpio.h>
#include <vendorcode/google/chromeos/chromeos.h>
#include <soc/gpio.h>
-#include "ec.h"
-#include "gpio.h"
+#include <variant/ec.h>
+#include <variant/gpio.h>
#define GPIO_PCH_WP GPIO_75
#define GPIO_EC_IN_RW GPIO_41
diff --git a/src/mainboard/google/reef/ec.c b/src/mainboard/google/reef/ec.c
index fd35eedcfc..612708ec5c 100644
--- a/src/mainboard/google/reef/ec.c
+++ b/src/mainboard/google/reef/ec.c
@@ -18,7 +18,7 @@
#include <ec/google/chromeec/ec.h>
#include <rules.h>
#include <soc/lpc.h>
-#include "ec.h"
+#include <variant/ec.h>
static void ramstage_ec_init(void)
{
diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c
index 92e5609b91..832019da23 100644
--- a/src/mainboard/google/reef/mainboard.c
+++ b/src/mainboard/google/reef/mainboard.c
@@ -21,8 +21,8 @@
#include <soc/gpio.h>
#include <soc/nhlt.h>
#include <vendorcode/google/chromeos/chromeos.h>
-#include "ec.h"
-#include "gpio.h"
+#include <variant/ec.h>
+#include <variant/gpio.h>
static void mainboard_init(void *chip_info)
{
diff --git a/src/mainboard/google/reef/romstage.c b/src/mainboard/google/reef/romstage.c
index aa1b18d2b8..6a7ed93557 100644
--- a/src/mainboard/google/reef/romstage.c
+++ b/src/mainboard/google/reef/romstage.c
@@ -16,7 +16,7 @@
#include <gpio.h>
#include <soc/meminit.h>
#include <soc/romstage.h>
-#include "gpio.h"
+#include <variant/gpio.h>
static const struct lpddr4_swizzle_cfg board_swizzle = {
/* CH0_DQA[0:31] SoC pins -> U22 LPDDR4 module pins */
diff --git a/src/mainboard/google/reef/smihandler.c b/src/mainboard/google/reef/smihandler.c
index d33222be9d..bbbdbcbeeb 100644
--- a/src/mainboard/google/reef/smihandler.c
+++ b/src/mainboard/google/reef/smihandler.c
@@ -20,8 +20,8 @@
#include <soc/pm.h>
#include <soc/smm.h>
#include <soc/gpio.h>
-#include "ec.h"
-#include "gpio.h"
+#include <variant/ec.h>
+#include <variant/gpio.h>
void mainboard_smi_gpi_handler(const struct gpi_status *sts)
{
diff --git a/src/mainboard/google/reef/ec.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/ec.h
index c4b1505c2c..7763630715 100644
--- a/src/mainboard/google/reef/ec.h
+++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/ec.h
@@ -13,8 +13,8 @@
* GNU General Public License for more details.
*/
-#ifndef MAINBOARD_EC_H
-#define MAINBOARD_EC_H
+#ifndef BASEBOARD_EC_H
+#define BASEBOARD_EC_H
#include <ec/google/chromeec/ec_commands.h>
diff --git a/src/mainboard/google/reef/gpio.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/gpio.h
index 9f0722599c..d43c35f7f3 100644
--- a/src/mainboard/google/reef/gpio.h
+++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/gpio.h
@@ -9,12 +9,12 @@
*
* 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#ifndef MAINBOARD_GPIO_H
-#define MAINBOARD_GPIO_H
+#ifndef BASEBOARD_GPIO_H
+#define BASEBOARD_GPIO_H
#include <soc/gpio.h>
@@ -370,4 +370,4 @@ static const struct pad_config sleep_gpio_table[] = {
#define MEM_CONFIG0 GPIO_101
#endif /* __ACPI__ */
-#endif /* MAINBOARD_GPIO_H */
+#endif /* BASEBOARD_GPIO_H */
diff --git a/src/mainboard/google/reef/variants/reef/include/variant/ec.h b/src/mainboard/google/reef/variants/reef/include/variant/ec.h
new file mode 100644
index 0000000000..586f1064f4
--- /dev/null
+++ b/src/mainboard/google/reef/variants/reef/include/variant/ec.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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.
+ */
+
+#ifndef MAINBOARD_EC_H
+#define MAINBOARD_EC_H
+
+#include <baseboard/ec.h>
+
+#endif
diff --git a/src/mainboard/google/reef/variants/reef/include/variant/gpio.h b/src/mainboard/google/reef/variants/reef/include/variant/gpio.h
new file mode 100644
index 0000000000..6d1ce5a0e4
--- /dev/null
+++ b/src/mainboard/google/reef/variants/reef/include/variant/gpio.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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.
+ */
+
+#ifndef MAINBOARD_GPIO_H
+#define MAINBOARD_GPIO_H
+
+#include <baseboard/gpio.h>
+
+#endif /* MAINBOARD_GPIO_H */