summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/Kconfig42
-rw-r--r--zephyr/shim/include/config_chip.h11
2 files changed, 46 insertions, 7 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 3b4a6ead7b..7041fd63ef 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -214,13 +214,7 @@ config PLATFORM_EC_CONSOLE_CMD_HCDEBUG
hcdebug [off | normal | every | params]
- off - No host command debug messages are shown.
- normal - Display host commands receieved from the AP. Repeated
- commands are shown with a "+" and "++" symbol.
- every - Display all host commands received from the AP, including
- repeated commands.
- params - Display all host commands and the parameters received from
- the AP.
+ See PLATFORM_EC_HOSTCMD_DEBUG_MODE for more detail.
config PLATFORM_EC_CONSOLE_CMD_MEM
bool "Console command: md, rw"
@@ -391,6 +385,40 @@ config PLATFORM_EC_HOSTCMD_REGULATOR
regulator. The board should also implement board functions defined in
include/regulator.h.
+choice PLATFORM_EC_HOSTCMD_DEBUG_MODE
+ prompt "Select method to use for HostCmd Debug Mode"
+ depends on PLATFORM_EC_HOSTCMD
+ default HCDEBUG_NORMAL
+ help
+ Sets the value of the host command debug mode to use on
+ startup.
+
+config HCDEBUG_OFF
+ bool "Host command debug mode OFF"
+ help
+ No host command debug messages are shown. Host
+ command error messages will still output.
+
+config HCDEBUG_NORMAL
+ bool "Host command debug mode NORMAL"
+ help
+ Display host commands receieved from the AP. Repeated
+ commands are shown with a "+" and "++" symbol.
+
+config HCDEBUG_EVERY
+ bool "Host command debug mode EVERY"
+ help
+ Display all host commands received from the AP,
+ including repeated commands.
+
+config HCDEBUG_PARAMS
+ bool "Host command debug mode PARAMS"
+ help
+ Display all host commands and the parameters received
+ from the AP.
+
+endchoice # PLATFORM_EC_HOSTCMD_DEBUG_MODE
+
config PLATFORM_EC_I2C
bool "I2C shim"
default n if ARCH_POSIX
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index deeebbd625..639f71b266 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1744,4 +1744,15 @@
#define CONFIG_FW_RESET_VECTOR
#endif
+#undef CONFIG_HOSTCMD_DEBUG_MODE
+#if defined(CONFIG_HCDEBUG_OFF)
+#define CONFIG_HOSTCMD_DEBUG_MODE 0
+#elif defined(CONFIG_HCDEBUG_NORMAL)
+#define CONFIG_HOSTCMD_DEBUG_MODE 1
+#elif defined(CONFIG_HCDEBUG_EVERY)
+#define CONFIG_HOSTCMD_DEBUG_MODE 2
+#elif defined(CONFIG_HCDEBUG_PARAMS)
+#define CONFIG_HOSTCMD_DEBUG_MODE 3
+#endif
+
#endif /* __CROS_EC_CONFIG_CHIP_H */