| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add taskinfo command as alias for "kernel threads" for backward
compatibility with CrOS EC.
BRANCH=main
BUG=b:190224781
TEST=Check that taskinfo correctly executes "kernel threads" command
Change-Id: Ibdce9d8342fb7a99577b1f8d031c419fa485e7b0
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174058
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some functions requires to call task_wait_event in test task context.
Because of that there is needed shimmed_tasks entry for
TASK_ID_TEST_RUNNER.
BUG=none
BRANCH=none
TEST=make configure --test zephyr/test/drivers
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I92cd3776a827f9a7f9bb1faee67ed998260e23a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3159528
Tested-by: Tomasz Michalec <tmichalec@google.com>
Tested-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code calling task_get_current() requires to return from this function
valid task ID. To test this code, new TASK_ID_TEST_RUNNER is introduced.
Test can set current thread as test runner and guarantee that
task_get_current() return valid task ID.
BUG=b:184856919
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Id5470e5337ab2419aad07f0f22de5f1576e870c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110086
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This routine is needed when enable CONFIG_HOST_COMMAND_STATUS.
This routine allows the caller to customize its actions, depending on
whether it is a thread or an ISR.
BUG=b:195342437
BRANCH=none
TEST=zmake testall
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Change-Id: Id2a948c67de81fbc8ee161e5711cff17b8ac359d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070941
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement irq functions for tasks.
BRANCH=none
BUG=b:190203712
TEST=can zmake hayato and it8xxx2_evb
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Change-Id: Ic35ed656f10a1b24543145421843b540a6cbc5a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2988744
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Zephyr deferred calls are run in k_sys_work_queue context instead of
thread running hook_task(). Because of that shimmed task_get_current() is
modfied to return TASK_ID_HOOKS if run from k_sys_work_queue context.
BUG=b:190727776
TEST=make hosttest
BRANCH=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I9e15627df8dce6b0829ad872150cbe2318330f28
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2953225
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These need to be implemented properly, or another way found. For now,
add stubs.
BUG=b:190213172
BRANCH=none
TEST=with other CLs, build asurada for Zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I12283dcc2b70b5e2c788169b9b3939cba4380f10
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941814
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The names stored in the shimmed task list are not accessible unless
CONFIG_THREAD_NAME is defined. Compile out the task names unless
CONFIG_THREAD_NAME is enabled.
This provides a modest 300 byte savings.
BUG=none
BRANCH=none
TEST=zmake testall
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Iaf6bc8a1a7311ed42221a89fc9520e962cdf1b7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2956829
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix task_start_called to return a correct value, not hardcoded 1.
The task_start_called is used before jumping to RW to prepare PD before
sysjump. If the PD tasks are not started, the preparation is not needed.
BUG=b:164421798
BRANCH=none
TEST=Flash DUT with bootimage with Zephyr included then boot with
the SoftSync enabled.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Ib2a2dbdb56c109e51a31b5a6f20a42f1e181727b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2794141
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CrOS EC OS provides one implicit timer associated with every task (see
docs/core_runtime.md). As luck has it, we never needed these implicit
timers for volteer, but ARM power sequencing code uses it.
This implements the timer_arm and timer_cancel functions, which
function equivalently to how they would in CrOS EC OS. (Note: we
previously were compiling timer_arm and timer_cancel from CrOS EC, but
these definitions were non-functional as we never call process_timers
from Zephyr).
BUG=b:183058135
BRANCH=none
TEST=provided unit tests pass
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ibad20002c489a8149efde713d8273adae835f653
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774362
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add implementation in lieu of Zephyr APIs. Zephyr's support for
irq_disable() doesn't disable all interrupts (see Zephyr's
include/arch/arm/aarch32/asm_inline_gcc.h for more information). The
implementation is done via a #define inside the system.c file, this is
done on purpose to avoid leaking the interrupt_disable() functionality
outside of sysjump. All other uses of disabling interrupts should be
done via irq_lock().
BRANCH=none
BUG=b:174481378
TEST=build/flash volteer, run sysjump command
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Idccb93211296f81796ce4ba200c62adc5c19e691
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2695959
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bring both flash.c and system.c into the build.
zephyr/shim/src/system.c now includes only code that is needed
to stub out the chip specific system.c implementation in
platform/ec (which is now using the devicetree values).
BRANCH=none
BUG=b:176828988, b:174481378
TEST=zmake testall
TEST=build volteer, flash, and test flashinfo.
Cq-Depend: chromium:2631353
Change-Id: I5c542fca01dcc4af98401bcbbf402e579cd45e36
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2649463
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable the PD_C0-3 tasks so that the power-delivery logic can run.
Drop the PLATFORM_EC_USB_PD_TCPMV2 Kconfig which does not actually
exist. We always use TCPMV2 with Zephyr.
BUG=b:175434113
BRANCH=none
TEST=make BOARD=volteer -j30
build volteer on zephyr
run and see lots of charge_requests and activity, none of it very
useful:
[658 Battery 26% (Display 24.2 %) / ??h:?? to full]
[662 charge_request(13200mV, 2584mA)]
[666 charge problem: set current, 0x0 -> 0xfffffffb after %.6llds]
[673 charge problem: set voltage, 0x0 -> 0xfffffffb after %.6llds]
[679 charge problem: set mode, 0x0 -> 0xfffffffb after %.6llds]
[707 charge problem: chg params, 0x0 -> 0x1f after %.6llds]
Signed-off-by: Simon Glass <sjg@chromium.org>
Cq-Depend: chromium:2623427
Change-Id: Icde0f7f4205d85e02cffded351c54047fe220c9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move the Ztest-related definitions out of test_util and into a
shim version of that header.
* Add definitions for EC unit tests declaring additional tasks so
the task shim will pick them up correctly.
* Copy the prng functions into the shimmed test_util.
BUG=None
BRANCH=None
TEST=`make clobber ; make buildall -j ; make runhosttests`
Then build the unit tests that have been ported to Ztest,
e.g. `zmake configure --test -B build/base32 zephyr/test/base32`
for `base32`, `crc`, `hooks`, `i2c`,and `tasks`
Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: Ia2873a4c2028fcb6960e80f683189def2f3a228d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2605231
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Auto-Submit: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is an option in the task_set_event function which force
the calling task to wait for an event. However, the option is never
used thus remove it.
This also will help in the Zephyr migration process.
BUG=b:172360521
BRANCH=none
TEST=make buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See platform/ec/common/build.mk for reference. The use of
keyboard_scan.c should only be allowed when HAS_TASK_KEYSCAN
is defined. As such, we should always set HAS_TASK_KEYSCAN to
1 if CONFIG_PLATFORM_EC_KEYBOARD is defined. Further,
CROS_EC_TASK_LIST was defined per project and it doesn't need
to be, we can instead define it once for all boards depending
on which tasks are set to 1 in shimmed_tasks.h
Note that shimmed_tasks.h can still be used in tests.
BRANCH=none
BUG=none
TEST=zmake testall
Cq-Depend: chromium:2566421
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Id0ed49dd49e3c4eb2ac23184cf943c91dcd261eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567560
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize the kernel objects before application code as a chance to run.
This ensures that any event that is set before tasks start will get
delivered (and won't crash the kernel).
BRANCH=none
BUG=none
TEST=included unit test
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I84ecfddbe706e7e1860f310571851ee8dedd07d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2535984
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add build assert to ensure that deferred task is lower than all of the
other shimmed tasks.
Also make priority of tasks from 0 to COUNT - 1 instead of 1 to COUNT
BRANCH=none
BUG=none
TEST=volteer still builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Iabe9f1117850975ec9bf3df1dcfc690b4725a7e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523389
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to align with go/zephyr-shim-how-to, update all of the
platform/ec header files to use "quotes" and only use <brackets> for
zephyr header files. Also include an empty line between the two.
BRANCH=none
BUG=none
TEST=all zephyr tests build and pass; build volteer
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I27c275c24aa4f8eb40e100b07517b60f548f06cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521594
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
Provide shim/translation layer for converting platform/ec tasks into
zephyr threads. Provide implementation API for platform/ec task_ API
BRANCH=none
BUG=b:171741620
TEST=unit test provided
TEST=clean_build.sh ~/chromiumos/src/platform/ec/zephyr/tests/tasks &&
../build/zephyr/zephyr.elf
Change-Id: Ia2a1f808ec56a89c2a08df9de318edb1b6e9f869
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518665
Reviewed-by: Simon Glass <sjg@chromium.org>
|