diff options
author | Tim Lin <tim2.lin@ite.corp-partner.google.com> | 2021-08-03 14:39:07 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-05 04:37:38 +0000 |
commit | f6cd71cca9679a36dd21e41ffc77fcfd5f84f464 (patch) | |
tree | 93af950b59e940927e1b309f3d1db9ebb69b5d2d | |
parent | c9a082a25252f0afd10eb98b45fdd291f40f4026 (diff) | |
download | chrome-ec-f6cd71cca9679a36dd21e41ffc77fcfd5f84f464.tar.gz |
zephyr: add support for CONFIG_HOST_COMMAND_STATUS
Add Kconfig option for CONFIG_HOST_COMMAND_STATUS.
BUG=b:195342437
BRANCH=none
TEST=zmake testall
Change-Id: Ia5adab17904cb3982788d642bc7c08b0bef69b6f
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3068489
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | zephyr/Kconfig | 12 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index a24996e2f6..409f1f3a97 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -735,4 +735,16 @@ config PLATFORM_EC_I2C_PASSTHRU_RESTRICTED Once enabled, board_allow_i2c_passthru function has to be implemented, which defines the allowed usage of the command. +config PLATFORM_EC_HOST_COMMAND_STATUS + bool "Return in-progress status for slow host commands" + default n + help + When the AP is attached to the EC via a serialized bus such as I2C or + SPI, it needs a way to minimize the length of time an EC command will + tie up the bus (and the kernel driver on the AP). If this config is + defined, the EC may return an in-progress result code for slow + commands such as flash erase/write instead of stalling until the + command finishes processing, and the AP may then inquire the status + of the current command and/or the result of the previous command. + endif # PLATFORM_EC diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index f49e1a05d8..317591ff86 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -1404,6 +1404,11 @@ #define CONFIG_HOSTCMD_RTC #endif +#undef CONFIG_HOST_COMMAND_STATUS +#ifdef CONFIG_PLATFORM_EC_HOST_COMMAND_STATUS +#define CONFIG_HOST_COMMAND_STATUS +#endif + #undef CONFIG_SWITCH #ifdef CONFIG_PLATFORM_EC_SWITCH #define CONFIG_SWITCH |