summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-08-13 17:27:54 -0600
committerCommit Bot <commit-bot@chromium.org>2021-12-17 00:40:53 +0000
commit41f4a580cb8a7d148ae7e3260d567f3c02a554ca (patch)
tree8c9b768d322996e8ee1ffcf144d8239d1ea01a82
parent0e06f56b56f5cee5e4604113b6da7d28798391fb (diff)
downloadchrome-ec-41f4a580cb8a7d148ae7e3260d567f3c02a554ca.tar.gz
zephyr: Rename eSPI configuration to match cros-ec
Rename PLATFORM_EC_ESPI to PLATFORM_EC_HOST_INTERFACE_ESPI to match the cros-ec config CONFIG_HOST_INTERFACE_ESPI. BUG=b:195416058 BRANCH=main TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I30d8448854601c137f54152424c5ddac62a21cce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3095844 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig4
-rw-r--r--zephyr/Kconfig.espi4
-rw-r--r--zephyr/Kconfig.port804
-rw-r--r--zephyr/app/ec/ec_app_main.c2
-rw-r--r--zephyr/projects/brya/brya/prj.conf2
-rw-r--r--zephyr/projects/nissa/prj_nivviks.conf2
-rw-r--r--zephyr/shim/include/config_chip.h13
-rw-r--r--zephyr/shim/src/CMakeLists.txt3
-rw-r--r--zephyr/test/drivers/prj.conf1
-rw-r--r--zephyr/test/ec_app/src/main.c2
11 files changed, 20 insertions, 19 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 3e561077f1..6eca8555f7 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -200,7 +200,7 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_DPTF
"${PLATFORM_EC}/common/dptf.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ
"${PLATFORM_EC}/common/chipset.c")
-zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ESPI
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_HOST_INTERFACE_ESPI
"${PLATFORM_EC}/common/espi.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC "${PLATFORM_EC}/common/extpower_common.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_EXTPOWER_GPIO
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index c3c68b3952..38e724a762 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -71,7 +71,7 @@ rsource "Kconfig.watchdog"
config PLATFORM_EC_ACPI
bool "Advanced Confiugration and Power Interface (ACPI)"
- default y if AP_X86 && PLATFORM_EC_ESPI
+ default y if AP_X86 && PLATFORM_EC_HOST_INTERFACE_ESPI
help
Enable the Advanced Configuration and Power Interface (ACPI) in the
EC. ACPI is a standard interface to the Application Processor (AP)
@@ -331,7 +331,7 @@ config PLATFORM_EC_EMULATED_SYSRQ
This option enables support for sending emulated SysRq events to AP
(on designs with a keyboard, SysRq is passed as normal key presses).
-menuconfig PLATFORM_EC_ESPI
+menuconfig PLATFORM_EC_HOST_INTERFACE_ESPI
bool "eSPI"
depends on ESPI && AP
default y
diff --git a/zephyr/Kconfig.espi b/zephyr/Kconfig.espi
index f35e4e8360..92c55b8884 100644
--- a/zephyr/Kconfig.espi
+++ b/zephyr/Kconfig.espi
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-if PLATFORM_EC_ESPI
+if PLATFORM_EC_HOST_INTERFACE_ESPI
config PLATFORM_EC_ESPI_VW_SLP_S3
bool "SLP_S3 is an eSPI virtual wire instead of a GPIO"
@@ -31,4 +31,4 @@ config PLATFORM_EC_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
maintain these pins' states per request. Note that this is
currently unimplemented for Zephyr. Please see b/183148073.
-endif # PLATFORM_EC_ESPI \ No newline at end of file
+endif # PLATFORM_EC_HOST_INTERFACE_ESPI \ No newline at end of file
diff --git a/zephyr/Kconfig.port80 b/zephyr/Kconfig.port80
index b3ff8ab60b..adeea08d20 100644
--- a/zephyr/Kconfig.port80
+++ b/zephyr/Kconfig.port80
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-if PLATFORM_EC_ESPI
+if PLATFORM_EC_HOST_INTERFACE_ESPI
config PLATFORM_EC_PORT80_4_BYTE
bool "Allow accept 4-byte Port80 codes"
@@ -11,4 +11,4 @@ config PLATFORM_EC_PORT80_4_BYTE
codes when AP sends 4-byte Port80 codes via eSPI PUT_IOWR_SHORT
protocol in a single transaction.
-endif # PLATFORM_EC_ESPI
+endif # PLATFORM_EC_HOST_INTERFACE_ESPI
diff --git a/zephyr/app/ec/ec_app_main.c b/zephyr/app/ec/ec_app_main.c
index 7cc5b170f1..0aa95502ce 100644
--- a/zephyr/app/ec/ec_app_main.c
+++ b/zephyr/app/ec/ec_app_main.c
@@ -61,7 +61,7 @@ void ec_app_main(void)
button_init();
}
- if (IS_ENABLED(CONFIG_PLATFORM_EC_ESPI)) {
+ if (IS_ENABLED(CONFIG_PLATFORM_EC_HOST_INTERFACE_ESPI)) {
if (zephyr_shim_setup_espi() < 0) {
printk("Failed to init eSPI!\n");
}
diff --git a/zephyr/projects/brya/brya/prj.conf b/zephyr/projects/brya/brya/prj.conf
index aa99096dd0..49604ecef5 100644
--- a/zephyr/projects/brya/brya/prj.conf
+++ b/zephyr/projects/brya/brya/prj.conf
@@ -26,8 +26,8 @@ CONFIG_AP_X86_INTEL_ADL=y
CONFIG_FPU=y
CONFIG_ARM_MPU=y
+# eSPI
CONFIG_ESPI=y
-CONFIG_PLATFORM_EC_ESPI=y
CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4=y
CONFIG_PLATFORM_EC_ESPI_VW_SLP_S5=y
diff --git a/zephyr/projects/nissa/prj_nivviks.conf b/zephyr/projects/nissa/prj_nivviks.conf
index c41288fb5d..1b16ff00b4 100644
--- a/zephyr/projects/nissa/prj_nivviks.conf
+++ b/zephyr/projects/nissa/prj_nivviks.conf
@@ -28,8 +28,8 @@ CONFIG_AP_X86_INTEL_ADL=y
CONFIG_FPU=y
CONFIG_ARM_MPU=y
+# eSPI
CONFIG_ESPI=y
-CONFIG_PLATFORM_EC_ESPI=y
CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4=y
# Host command
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 1cb552d4bd..0ca24edc17 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -330,32 +330,33 @@
#define CONFIG_EMULATED_SYSRQ
#endif
-/* eSPI configuration */
-#ifdef CONFIG_PLATFORM_EC_ESPI
-
-#ifdef CONFIG_PLATFORM_EC_HOSTCMD
+/* Host interface selection */
+#undef CONFIG_HOST_INTERFACE_ESPI
+#ifdef CONFIG_PLATFORM_EC_HOST_INTERFACE_ESPI
#define CONFIG_HOST_INTERFACE_ESPI
#endif
/* eSPI signals */
+#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S3
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S3
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3
#endif
+#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S4
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4
#endif
+#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S5
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S5
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S5
#endif
+#undef CONFIG_HOSTCMD_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#ifdef CONFIG_PLATFORM_EC_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#define CONFIG_HOSTCMD_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#endif
-#endif /* CONFIG_PLATFORM_EC_ESPI */
-
#if DT_HAS_CHOSEN(zephyr_flash)
#define CONFIG_PROGRAM_MEMORY_BASE DT_REG_ADDR(DT_CHOSEN(zephyr_flash))
#else
diff --git a/zephyr/shim/src/CMakeLists.txt b/zephyr/shim/src/CMakeLists.txt
index fe9a5a015d..4513e32076 100644
--- a/zephyr/shim/src/CMakeLists.txt
+++ b/zephyr/shim/src/CMakeLists.txt
@@ -21,7 +21,8 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE
battery.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CBI_EEPROM cbi.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CBI_GPIO cbi.c)
-zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ESPI espi.c)
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_HOST_INTERFACE_ESPI
+ espi.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FAN fan.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FLASH_CROS flash.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_HOOKS hooks.c)
diff --git a/zephyr/test/drivers/prj.conf b/zephyr/test/drivers/prj.conf
index 98ed0d7df3..01b60383c8 100644
--- a/zephyr/test/drivers/prj.conf
+++ b/zephyr/test/drivers/prj.conf
@@ -96,7 +96,6 @@ CONFIG_PLATFORM_EC_USB_PD_TCPM_MULTI_PS8XXX=y
CONFIG_ESPI=y
CONFIG_ESPI_EMUL=y
CONFIG_EMUL_ESPI_HOST=y
-CONFIG_PLATFORM_EC_ESPI=y
CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION=y
CONFIG_ESPI_PERIPHERAL_CUSTOM_OPCODE=y
CONFIG_ESPI_PERIPHERAL_EC_HOST_CMD=y
diff --git a/zephyr/test/ec_app/src/main.c b/zephyr/test/ec_app/src/main.c
index 6aa2d6c1b9..47aecc7eca 100644
--- a/zephyr/test/ec_app/src/main.c
+++ b/zephyr/test/ec_app/src/main.c
@@ -45,7 +45,7 @@ static void test_button_init(void)
static void test_setup_espi(void)
{
-#ifdef CONFIG_PLATFORM_EC_ESPI
+#ifdef CONFIG_PLATFORM_EC_HOST_INTERFACE_ESPI
zassert_unreachable("TODO: Implement this test.");
#else
ztest_test_skip();