summaryrefslogtreecommitdiff
path: root/util/ec_flash.c
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-231/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* util: Add explicit castsTom Hughes2021-05-061-1/+1
| | | | | | | | | | | | | | When compiling with C++, the implicit casting that is performed in C is disallowed. Add casts in preparation for C++ compatibility. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5c25440819428db65225c772c1c5115a735db58a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864519 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* util/ec_flash: avoid divide-by-zeroPatrick Georgi2019-07-311-0/+7
| | | | | | | | | | | | | | | BUG=none BRANCH=none TEST=none Change-Id: I514c2aa307e94be826e9c8e219eb471892b3fad6 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Found-by: Coverity Scan #201954 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1725951 Tested-by: Patrick Georgi <pgeorgi@chromium.org> Auto-Submit: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
* ectool: Add support for EC_CMD_FLASH_INFO version 2Tom Hughes2019-07-151-12/+70
| | | | | | | | | | | | | | | | | BRANCH=none BUG=b:132444384 TEST=On hatch_fp: ectool --name=cros_fp reboot_ec; sleep 0.5; ectool --name=cros_fp rwsigaction abort; dd if=/dev/urandom of=/tmp/rand_file bs=1 count=131072; ectool --name=cros_fp flashwrite 262144 /tmp/rand_file Change-Id: I22f70ae29285dc5bded558b9f0bcbe5040a80750 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1677234 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-191-1/+1
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ectool: add async flash eraseTom Hughes2019-06-061-0/+39
| | | | | | | | | | | | | | | BRANCH=none TEST=ectool --name=cros_fp reboot_ec; sleep 0.5 && \ ectool --name=cros_fp rwsigaction abort; \ ectool --name=cros_fp flasheraseasync 393216 131072 (using hatch EVT fingerprint board: STM32F412) TEST=make buildall -j BUG=b:132444384 Change-Id: I4a78c5bf7ef323a14083cc9d5fa3ec2c5218245d Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1637496 Reviewed-by: Jett Rink <jettrink@chromium.org>
* Allow bigger flash write commandsRandall Spangler2013-07-011-6/+36
| | | | | | | | | | | | | | | | 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
* Comm interface now provides max I/O sizes and preallocated buffersRandall Spangler2013-07-011-6/+4
| | | | | | | | | | | | | | | | | | | | The maximum packet / param size differs depending on interface and protocol version. Commands can now ask the comm interface what the limits are, and can use preallocated buffers to avoid needless malloc/free. BUG=chrome-os-partner:20571 BRANCH=none TEST=the following all work on link burn_my_ec ectool version ectool chargedump ectool console ectool i2cxfer 5 0x41 2 Change-Id: Ib847994da3f79721e7fb4e347231b9147a3f485f Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60275
* Add common interface to EC flash commandsRandall Spangler2013-07-011-0/+99
ectool and burn_my_ec need to use the same lower-level interface to the EC flash commands, rather than duplicating calling the low-level flash read/write/erase commands. This is a precursor to refactoring the low-level commands to support SPI/STM32L in a follow-up CL. BUG=chrome-os-partner:20571 BRANCH=none TEST=in a root shell, burn_my_ec flashes both RO and RW EC code Change-Id: I4c72690100d86dbff03b7dacc2fb248b571d3820 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60266