summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2019-10-25 16:36:38 -0600
committerCommit Bot <commit-bot@chromium.org>2019-10-30 20:13:03 +0000
commit6136a62b472f028329863e4f5adb9464d68deafa (patch)
tree690ec695477fb2fc47d5d8835761e05f98c3b19c /include/config.h
parent3e3135b1b9ad2ff1a0d8f1b7448fd2c2f8198adb (diff)
downloadchrome-ec-6136a62b472f028329863e4f5adb9464d68deafa.tar.gz
eSPI: Configure SLP_S3, SLP_S4 separately
Split the configuration option CONFIG_HOSTCMD_ESPI_VW_SLP_SIGNALS into separate options controlling SLP_S3 and SLP_S4. Allow volteer to configure SLP_S3 as a GPIO and SLP_S4 as an eSPI virtual wire. Cause a build error if virtual wires are configured, but eSPI is not. BUG=b:139553375,b:143288478 TEST=make buildall TEST=Build volteer with CONFIG_HOSTCMD_ESPI_VW_S4 defined but CONFIG_HOSTCMD_ESPI undefined; observe build error BRANCH=none Change-Id: I8c6737e2ccb1a77a882e5fa65c6eddb342209b61 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1881758 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/config.h b/include/config.h
index 83c1a52bd7..72166713d6 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2660,7 +2660,8 @@
* SLP signals (SLP_S3 and SLP_S4) use virtual wires intead of physical pins
* with eSPI interface.
*/
-#undef CONFIG_HOSTCMD_ESPI_VW_SLP_SIGNALS
+#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S3
+#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S4
/* MCHP next two items are EC eSPI slave configuration */
/* Maximum clock frequence eSPI EC slave advertises
@@ -4362,6 +4363,19 @@
#include "config_chip.h"
#include "board.h"
+/*
+ * Define CONFIG_HOST_ESPI_VW_POWER_SIGNAL if any power signals from the host
+ * are configured as virtual wires.
+ */
+#if defined(CONFIG_HOSTCMD_ESPI_VW_SLP_S3) || \
+ defined(CONFIG_HOSTCMD_ESPI_VW_SLP_S4)
+#define CONFIG_HOST_ESPI_VW_POWER_SIGNAL
+#endif
+
+#if defined(CONFIG_HOST_ESPI_VW_POWER_SIGNAL) && !defined(CONFIG_HOSTCMD_ESPI)
+#error Must enable eSPI to enable virtual wires.
+#endif
+
/******************************************************************************/
/*
* Automatically define CONFIG_HOSTCMD_X86 if either child option is defined.