Both of these are included via common.h, which is in turn included by
most other header files. Directly including board.h or config.h is
redundant and discouraged.
No code changes, just removing #includes.
This is in preparation for making a top-level config.h file, but that
change will be easier to review if it doesn't touch as many files.
BUG=chrome-os-partner:18343
BRANCH=none
TEST=build all platforms
Change-Id: I204bcebe5607c6e6808821eb071cfc31d2a93a7c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62121
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This tests host event and hook are triggered when AC status changes.
BUG=chrome-os-partner:19236
TEST=Pass the test.
BRANCH=None
Change-Id: I9e4263f3f6e273bfb0b24671a4e5c56b20a04e1a
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61554
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This checks the functionality of thermal engine related host and
console commands.
BUG=chrome-os-partner:19236
TEST=Pass all tests.
BRANCH=None
Change-Id: I604ed3bfed3549b2573fac65da83450acd3f2797
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/60964
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This checks the correctness of data returned by flash read host command.
BUG=chrome-os-partner:19236
TEST=Pass all tests.
BRANCH=None
Change-Id: I3b97addb9b14922e9f33a71b865000ae9a8d40a8
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/60963
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Version 1 of EC_CMD_FLASH_WRITE will use as big a write as possible given
the available command parameter space. Falls back to 64 byte writes on old
platforms.
BUG=chrome-os-partner:20571
BRANCH=none
TEST=Copy burn_my_ec onto a link and run it. Write size should be 64 bytes
for the first half of the update (since the old EC doesn't support ver.1
of the write command) and 240 bytes for the second half of the update.
Change-Id: I5900de3a5700d7c82a2e0c3cf9921b7ced1c0343
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/60511
This will be used often, so let's move it to test_util.c.
BUG=chrome-os-partner:19235
TEST=Pass flash test.
BRANCH=None
Change-Id: I2f685f657f8742c2b29e3b9c88ba01daacf982f8
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58793
By 'make coverage', lcov is used to generate test coverage report in
HTML format stored in coverage_rpt folder.
BUG=chrome-os-partner:19235
TEST=Generate a report.
BRANCH=None
Change-Id: I44142eaaeb897cf09179764781120370920144cd
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58203
The firmware defines had two almost-identical sets. Coalesce into one
consistent set.
Link had 256 KB flash, but only allowed 2 80KB images. Future
LM4-based platforms (slippy/peppy/falco/etc) will now use the entire
flash, with RO=124KB, pstate=4KB, RW=128KB. This matches what the
STM32 platforms do, where pstate is contiguous with the RO firmware.
No functional change to STM32-based platforms.
BUG=chrome-os-partner:19176
BRANCH=none
TEST=build all platforms and dump_fmap ec.bin.
- stm32-based platforms should report RO=61440@0, RW=65536@0x10000
- link should report RO=81920@0, RW=81920@0x14000
- slippy should report RO=129024@0, RW=131072@0x20000
Change-Id: I20b1d95c16250d9a5d228ead06eef03d96548823
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56655
This change copies the slippy board configuration as a starting
point for peppy. This change is essentially the same as
https://gerrit.chromium.org/gerrit/55820
BUG=chrome-os-partner:19640
BRANCH=none
TEST=manual
Tested on slippy as there are no peppy-specific changes yet.
cros_workon --board peppy start chromeos-ec
emerge-peppy chromeos-ec
~/trunk/src/platform/ec/util/flash_ec --board peppy
Signed-off-by: Dave Parker <dparker@chromium.org>
Change-Id: I4c5f7a77fa55a6364effe838f7a656d56bfad9fb
Reviewed-on: https://gerrit.chromium.org/gerrit/56332
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Queue: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
Write protect signal naming is now consistent across boards.
New CONFIG_WP_ACTIVE_HIGH is present on systems where the write
protect signal is active-high (e.g. Link). This will be used in the
next CL, which moves flash_get_protect() to flash_common.c
BUG=chrome-os-partner:15613
BRANCH=none
TEST=flashinfo properly reports WP signal status
Change-Id: I502ab033c3eb36661cc3ee97320874b3fbf6fc0d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56087
Reviewed-by: Vic Yang <victoryang@chromium.org>
This change just copies slippy and tweaks a few things that were
slippy-specific instead of not-link-specific (there are still bugs
open for those things).
BUG=chrome-os-partner:18788
BRANCH=none
TEST=manual
Since there are no Falco-specific changes yet (just slippy with another
name), I can try it on Slippy:
cros_workon --board falco start chromeos-ec
emerge-falco chromeos-ec
~/trunk/src/platform/ec/util/flash_ec --board falco
I also built and tested Link EC, to make sure nothing broke there either.
Change-Id: I9b3682032bd51adab4450520dfe52e3036750ef9
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/55820
Reviewed-by: Randall Spangler <rspangler@chromium.org>
We unit test to be as less time sensitive as possible. This change
adjusts the timing in the test to ensure we have enough time for context
switching. Otherwise we get false negative sometimes.
BUG=chrome-os-partner:19236
TEST=Repeatedly run the test and see it passes.
BRANCH=None
Change-Id: I90c1200641cb02f95bd7631bd2870ad21b21bffc
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/51562
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Current timing constraints are too tight that the test sometimes fails
when it shouldn't.
BUG=chrome-os-partner:19236
TEST=Pass the test
BRANCH=None
Change-Id: Ib94ff44691ba36f14dbf02319d0371770b5ece5d
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/51250
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Several test utility macros have been duplicated across tests. Let's put
them in a single place.
BUG=chrome-os-partner:19236
TEST='make runtests', 'BOARD=spring make tests'
BRANCH=None
Change-Id: Ib0c9f829715425cc23e33b8ef456b17dfadab13c
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50513
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
The current delay is unnecessarily long. This CL shortens the delay.
BUG=chrome-os-partner:19236
TEST='make runtests'
BRANCH=None
Change-Id: Ica07458e7ae15cf28c3482b6df96df66c0d45182
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50487
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This is needed for non-volatile register emulation. Also, this can be
used to implement system jump or reset flags.
BUG=chrome-os-partner:19235
TEST=Run utils test. Check persistent storage file exists.
BRANCH=None
Change-Id: I699f95718ef6f5de6c3bbb4e37619ee015fb6c4a
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50313
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This is the first version of pthread-based RTOS emulator. With this, we
will be able to test high-level modules entirely on the host machine.
BUG=chrome-os-partner:19325
TEST='make runtests' and see tests passing.
BRANCH=None
Change-Id: I1f5fcd76aa84bdb46c7d35c5e60ae5d92fd3a319
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49954
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
A test that check keyboard MKBP module using keyboard scanning module and
host commands.
BUG=chrome-os-partner:19236
TEST=Pass the test
BRANCH=None
Change-Id: Ic22a2c8f3069d8e72c1222882073d428b733bca3
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50132
LM4 doesn't have implementation of adc_read_all_channels(). Let's use
adc_read_channel() in this case.
BUG=chrome-os-partner:18598
TEST=Build stress test for link. See no error about
adc_read_all_channels() undefined.
BRANCH=None
Change-Id: I5b13384468667cbd17b83faab9f9d3fdc48de91d
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49589
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Some tests are not applicable to all boards. This change makes test-list
a per-board parameter so a test can be enabled/disabled for individual
boards. Also disable all the tests that don't compile now.
BUG=chrome-os-partner:18598
TEST=make tests for all boards
BRANCH=None
Change-Id: Id2d18e23856f5c64dbdc7c6ca5949f8ad61b5cc0
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49452
We are moving to a per-function mock mechanism, which is less likely to
break when someone adds a function to a file with a mock.
BUG=chrome-os-partner:18598
TEST=None
BRANCH=None
Change-Id: Ie625064730d2224accbaf1febbdc4750e793d047
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49451
If we don't have lid switch, don't test it.
BUG=chrome-os-partner:18598
TEST=Build on mccroskey and see errors about GPIO_LID_OPEN go away.
BRANCH=None
Change-Id: I1084e1bfc2e6bd611dc393c1b2d501e786d2a0e3
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49450
This fills in test parameters for link, pit, snow, and daisy. Also fixes
compilation error due to CONFIG_ADC not defined.
BUG=chrome-os-partner:18598
TEST=Build test-stress. (Link failed due to unrelated issue.)
BRANCH=None
Change-Id: I8a5cfcf4acdae607c23dbe5cf3378945f91c7807
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49449
Also changes utils test to use EC_SUCCESS to indicate test success.
BUG=chrome-os-partner:18598
TEST=Run on Spring
BRANCH=None
Change-Id: I4a9b08550c15f09cd467706b6a3c0142dd06a558
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48751
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Hello test should be a setup step for every test. This should be
implemented on the test server side. Remove it to reduce number of test
binaries.
BUG=chrome-os-partner:18598
TEST=None
BRANCH=None
Change-Id: I462156f6d7affdf7ceb67e4354804fedb18a5424
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48196
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This merges flash_overwrite and flash_rw_erase to a single test binary.
BUG=chrome-os-partner:18598
TEST=Run on Spring
BRANCH=None
Change-Id: I1da7577cb5dc196178930dda3a07bb942d959866
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48090
Reviewed-by: Randall Spangler <rspangler@chromium.org>
To minimize the number of test binaries, we should put as many tests in
a single binary as possible. This CL merges kb_debouncing and
kb_deghosting and renames them to kb_scan.
BUG=chrome-os-partner:18598
TEST=Run on Spring
BRANCH=None
Change-Id: I876363ba68c692a7af10badfa474a2ea9a9d002c
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47980
Those mock files were used by QEMU-based test. Now that we moved to
hardware test, we can remove them.
BUG=chrome-os-partner:18598
TEST=Run on Spring
BRANCH=None
Change-Id: I1600b39132c598a07d3d6439fd837c0d78ea8820
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47968