summaryrefslogtreecommitdiff
path: root/zephyr/shim
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-12-09 11:20:41 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-09 19:51:29 +0000
commitb208ebb26cf76e0c28e6aa324a45019789b7a0e3 (patch)
tree5966e2bb39ab55696490c9124122f7ba24688a9e /zephyr/shim
parentc515b5ad73f9b95b3f066b93c9c87acae2dcec90 (diff)
downloadchrome-ec-b208ebb26cf76e0c28e6aa324a45019789b7a0e3.tar.gz
zephyr: enable CONFIG_HOSTCMD_ESPI
This enables CONFIG_HOSTCMD_ESPI when we have ESPI and host commands enabled (the case with volteer). There were two functions stubbed out that we will leave to Nuvoton to implement. BUG=b:175217186,b:172678200 BRANCH=none TEST=boot volteer Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9b6a8c7c60d1a1018292a207a61c583fd171e546 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582445 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r--zephyr/shim/include/config_chip.h9
-rw-r--r--zephyr/shim/src/espi.c15
2 files changed, 24 insertions, 0 deletions
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 5fbefc7125..698422f091 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -26,6 +26,13 @@
#define CONFIG_CHIPSET_TIGERLAKE
#endif
+/* eSPI configuration */
+#ifdef CONFIG_PLATFORM_EC_ESPI
+
+#ifdef CONFIG_PLATFORM_EC_HOSTCMD
+#define CONFIG_HOSTCMD_ESPI
+#endif
+
/* eSPI signals */
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S3
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3
@@ -35,6 +42,8 @@
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4
#endif
+#endif /* CONFIG_PLATFORM_EC_ESPI */
+
#ifdef CONFIG_PLATFORM_EC_I2C
/* Also see shim/include/i2c/i2c.h which defines the ports enum */
#define CONFIG_I2C
diff --git a/zephyr/shim/src/espi.c b/zephyr/shim/src/espi.c
index c91186324d..4ff7c48b5d 100644
--- a/zephyr/shim/src/espi.c
+++ b/zephyr/shim/src/espi.c
@@ -12,7 +12,9 @@
#include <zephyr.h>
#include "chipset.h"
+#include "common.h"
#include "espi.h"
+#include "lpc.h"
#include "port80.h"
#include "zephyr_espi_shim.h"
@@ -205,3 +207,16 @@ int espi_vw_disable_wire_int(enum espi_vw_signal signal)
atomic_and(&signal_interrupt_enabled, ~signal_to_interrupt_bit(signal));
return 0;
}
+
+static uint8_t lpc_memmap[256] __aligned(8);
+
+uint8_t *lpc_get_memmap_range(void)
+{
+ /* TODO(b/175217186): implement eSPI functions for host commands */
+ return lpc_memmap;
+}
+
+void lpc_update_host_event_status(void)
+{
+ /* TODO(b/175217186): implement eSPI functions for host commands */
+}