summaryrefslogtreecommitdiff
path: root/zephyr/shim/src/tasks.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-11-06 14:18:04 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-09 19:13:17 +0000
commit1b4e189e44379cf1db7639f2549441a8d678a978 (patch)
treeb3e9758c6bc59808cb6e3d11bfc8b3f684795e9c /zephyr/shim/src/tasks.c
parent8141e8d7eeeb915f2b529de39570e2efc8b86466 (diff)
downloadchrome-ec-1b4e189e44379cf1db7639f2549441a8d678a978.tar.gz
zephyr: move from SYS_INIT to main
We are going to need to perform initialization in Zephyr's main before we start the EC tasks or call the INIT hooks. If we rely on SYS_INIT, all of that happens before main is called. BRANCH=none BUG=none TEST=pass tasks unit tests and run on volteer Cq-Depend: chromium:2523462 Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: Icd035695b86fc9690cea88887902be61d9b37a18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523380 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/shim/src/tasks.c')
-rw-r--r--zephyr/shim/src/tasks.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c
index b3450c9387..f954401a45 100644
--- a/zephyr/shim/src/tasks.c
+++ b/zephyr/shim/src/tasks.c
@@ -183,10 +183,8 @@ static void task_entry(void *task_contex, void *unused1, void *unused2)
ctx->entry((void *)ctx->parameter);
}
-static int start_ec_tasks(const struct device *unused)
+void start_ec_tasks(void)
{
- ARG_UNUSED(unused);
-
for (size_t i = 0; i < ARRAY_SIZE(shimmed_tasks); ++i) {
struct task_ctx *const ctx = &shimmed_tasks[i];
@@ -200,6 +198,4 @@ static int start_ec_tasks(const struct device *unused)
task_entry, ctx, NULL, NULL,
K_PRIO_PREEMPT(TASK_ID_COUNT - i), 0, K_NO_WAIT);
}
- return 0;
}
-SYS_INIT(start_ec_tasks, APPLICATION, 10);