diff options
author | Bernardo Perez Priego <bernardo.perez.priego@intel.com> | 2022-04-20 11:29:46 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-26 00:45:40 +0000 |
commit | f1ad880e1adb9ee1968e322a82279337fc29a990 (patch) | |
tree | 434651e130b9c8b269c31b85f08ef3fd66744f4a | |
parent | 6474d52f8ade8e9b4bc3705ab61b7e3ebbc6e346 (diff) | |
download | chrome-ec-f1ad880e1adb9ee1968e322a82279337fc29a990.tar.gz |
zephyr: ap_pwrseq: Make thread priority configurable
This will enable setting AP power sequence thread priority
using Kconfig.
BUG=b:229848021
BRANCH=None
TEST=zmake build nivviks; flash & run
Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Change-Id: I0e46a0376dc3d49cc7a7d77ee756143ee54422ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3597890
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
-rw-r--r-- | zephyr/subsys/ap_pwrseq/Kconfig | 8 | ||||
-rw-r--r-- | zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/zephyr/subsys/ap_pwrseq/Kconfig b/zephyr/subsys/ap_pwrseq/Kconfig index 99ad4c819d..38250d377f 100644 --- a/zephyr/subsys/ap_pwrseq/Kconfig +++ b/zephyr/subsys/ap_pwrseq/Kconfig @@ -40,6 +40,14 @@ config AP_PWRSEQ_STACK_SIZE this Kconfig appears before the EC chip specific stack sizes. +config AP_PWRSEQ_THREAD_PRIORITY + int "AP pwrseq thread priority" + default 12 + help + This option determines AP power sequence thread priority, this number + must be selected in such way thread priority is in the middle of all + the enabled threads. + config X86_NON_DSX_PWRSEQ bool default n diff --git a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c index bcc34bd32d..b5f853cc95 100644 --- a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c +++ b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c @@ -481,7 +481,7 @@ static inline void create_pwrseq_thread(void) K_KERNEL_STACK_SIZEOF(pwrseq_thread_stack), (k_thread_entry_t)pwrseq_loop_thread, NULL, NULL, NULL, - K_PRIO_COOP(8), 0, + CONFIG_AP_PWRSEQ_THREAD_PRIORITY, 0, IS_ENABLED(CONFIG_AP_PWRSEQ_AUTOSTART) ? K_NO_WAIT : K_FOREVER); |