summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2021-10-18 10:38:53 +0200
committerCommit Bot <commit-bot@chromium.org>2021-10-26 13:19:09 +0000
commit596a620e9ae16b8553d67efb11f5ced3c6dc1685 (patch)
tree121c46db2fe29e2b1d1f359c2c72234799489a3a
parent544cc150adb8ed3f228cd4ce57cc43f662a6d562 (diff)
downloadchrome-ec-596a620e9ae16b8553d67efb11f5ced3c6dc1685.tar.gz
zephyr: remove option to use printk
CONFIG_PLATFORM_EC_CONSOLE_USES_PRINTK was used by riscv boards to avoid HARD_RESET during PD negotiation. Once, it is fixed, the option can be removed. BUG=b:193585176 TEST=zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I665534c569c71cdf2bb17e9657929dea53351ad5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229267 Tested-by: Dawid Niedzwiecki <dawidn@google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
-rw-r--r--zephyr/Kconfig.console11
-rw-r--r--zephyr/projects/corsola/krabby/prj.conf1
-rw-r--r--zephyr/shim/src/console.c10
3 files changed, 1 insertions, 21 deletions
diff --git a/zephyr/Kconfig.console b/zephyr/Kconfig.console
index c1edee71d5..602a2ea26a 100644
--- a/zephyr/Kconfig.console
+++ b/zephyr/Kconfig.console
@@ -51,14 +51,3 @@ config PLATFORM_EC_HOSTCMD_CONSOLE_BUF_SIZE
modular arithmetic is used.
endif # PLATFORM_EC_HOSTCMD_CONSOLE
-
-config PLATFORM_EC_CONSOLE_USES_PRINTK
- bool "Console uses printk"
- depends on CONSOLE
- help
- Implement zephyr_print using printk for all cases instead
- of using shell_fprintf for non-ISR uses in
- shim/common/console.c.
- Some devices have not been able to output to the console
- fast enough using shell_fprintf and end up timing out
- unrelated functionality.
diff --git a/zephyr/projects/corsola/krabby/prj.conf b/zephyr/projects/corsola/krabby/prj.conf
index 646e96453f..c5522ebd8f 100644
--- a/zephyr/projects/corsola/krabby/prj.conf
+++ b/zephyr/projects/corsola/krabby/prj.conf
@@ -9,7 +9,6 @@ CONFIG_SHIMMED_TASKS=y
# Bring up options
CONFIG_KERNEL_SHELL=y
CONFIG_PLATFORM_EC_SYSTEM_UNLOCKED=y
-CONFIG_PLATFORM_EC_CONSOLE_USES_PRINTK=y
# Battery
CONFIG_PLATFORM_EC_BATTERY=y
diff --git a/zephyr/shim/src/console.c b/zephyr/shim/src/console.c
index 3fc3896ec2..41e138b50c 100644
--- a/zephyr/shim/src/console.c
+++ b/zephyr/shim/src/console.c
@@ -272,15 +272,7 @@ static void zephyr_print(const char *buff, size_t size)
if (k_is_in_isr() || shell_zephyr->ctx->state != SHELL_STATE_ACTIVE) {
printk("%s", buff);
} else {
- /*
- * On some platforms, shell_* functions are not as fast
- * as printk and they need the added speed to avoid
- * timeouts.
- */
- if (IS_ENABLED(CONFIG_PLATFORM_EC_CONSOLE_USES_PRINTK))
- printk("%s", buff);
- else
- shell_fprintf(shell_zephyr, SHELL_NORMAL, "%s", buff);
+ shell_fprintf(shell_zephyr, SHELL_NORMAL, "%s", buff);
if (IS_ENABLED(CONFIG_PLATFORM_EC_HOSTCMD_CONSOLE))
console_buf_notify_chars(buff, size);
}