summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Lin <CHLin56@nuvoton.com>2021-05-03 15:45:25 +0800
committerCommit Bot <commit-bot@chromium.org>2021-05-04 16:59:58 +0000
commit94a24a705f907613bfb5ab10efb7022ff422274a (patch)
tree678cea79d95b9b1403a5bc1f59db10d151c938a2
parent0c9bceb8d6adc92b1386488c6781ed415fd7e248 (diff)
downloadchrome-ec-94a24a705f907613bfb5ab10efb7022ff422274a.tar.gz
zephyr: Add Port80 Kconfig option
Add the new config CONFIG_PORT80_4_BYTE option to the Zephyr Kconfig tree. BRANCH=none BUG=b:184872297 TEST=New config option is in Zephyr menuconfig. TEST="BOARD="npcx9_evb make"; the checker doesn't complain the missing of new config option. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: Ifa5d91cb315f85d452996a47f9f715fe16f49b51 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2866029 Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Raul E Rangel <rrangel@chromium.org>
-rw-r--r--zephyr/Kconfig1
-rw-r--r--zephyr/Kconfig.port8014
-rw-r--r--zephyr/shim/include/config_chip.h5
3 files changed, 20 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 6530089458..082f671888 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -46,6 +46,7 @@ rsource "Kconfig.init_priority"
rsource "Kconfig.keyboard"
rsource "Kconfig.led"
rsource "Kconfig.panic"
+rsource "Kconfig.port80"
rsource "Kconfig.powerseq"
rsource "Kconfig.pmic"
rsource "Kconfig.mkbp_event"
diff --git a/zephyr/Kconfig.port80 b/zephyr/Kconfig.port80
new file mode 100644
index 0000000000..b3ff8ab60b
--- /dev/null
+++ b/zephyr/Kconfig.port80
@@ -0,0 +1,14 @@
+# Copyright 2021 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+if PLATFORM_EC_ESPI
+
+config PLATFORM_EC_PORT80_4_BYTE
+ bool "Allow accept 4-byte Port80 codes"
+ help
+ Enable this config to allow the common Port80 layer to accept 4-byte
+ codes when AP sends 4-byte Port80 codes via eSPI PUT_IOWR_SHORT
+ protocol in a single transaction.
+
+endif # PLATFORM_EC_ESPI
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 1bb7e11cb8..bd12196adf 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1496,4 +1496,9 @@
#define CONFIG_LOW_POWER_IDLE
#endif
+#undef CONFIG_PORT80_4_BYTE
+#ifdef CONFIG_PLATFORM_EC_PORT80_4_BYTE
+#define CONFIG_PORT80_4_BYTE
+#endif
+
#endif /* __CROS_EC_CONFIG_CHIP_H */