They're of really little consequence right now since an error in
verify_flash() is only followed by resource tear down and process exit.
verify_flash could gain other call-sites though, so better be safe than
sorry.
BUG=none
BRANCH=none
TEST=none
Change-Id: I5fa8276dc3b3e124dacceca1ea857430982f7567
Found-by: Coverity Scan #141761, #141762
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/702482
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Chris Ching <chingcodes@chromium.org>
This change is separated from CL:344481.
We need a cold reset after flashing, but we kill 'servod' before
execute iteflash for each flashing process.
With this change, we can restart 'servod' again without errors.
And we are able to use dut-control to do a EC cold reset.
BRANCH=none
BUG=none
TEST=flashing completed, and wait for servo's cold reset.
Change-Id: Ifc242467211253fabcd733a971e999baa68a1026
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/488002
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=none
TEST=Test OK on ITE8390CX.
You can run "make -j BOARD=it8380dev" to build ec.bin
and flash the ec.bin via
"sudo ./build/it8380dev/util/iteflash -w ./build/it8380dev/ec.bin"
Change-Id: I2077012114bdbd5a8cc8f7dc29e43cdcb77d65b6
Signed-off-by: Donald Huang <donald.huang@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/334176
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Latest GCC gives compiler error:
util/iteflash.c: In function verify_flash:
util/iteflash.c:927:9: error: res may be used uninitialized in
this function [-Werror=maybe-uninitialized]
return res;
^
BUG=None
TEST=`make buildall -j` outside chroot
BRANCH=None
Change-Id: I184d8673020552797fd54bb98ee582a63debbf16
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/330873
Reviewed-by: Shawn N <shawnn@chromium.org>
Add support for flash the ite ec from usb gpio port
Signed-off-by: Donald Huang <donald.huang@ite.com.tw>
BRANCH=none
BUG=none
TEST=Test OK on ITE8390CX from both GPIO PORT (C1,C2) (H5,H6)
You can run "make -j BOARD=it8380dev" to build ec.bin
and flash the ec.bin via
"sudo ./build/it8380dev/util/iteflash -w ./build/it8380dev/ec.bin"
/* ==SNAPSHOT START== */
(cr) (br-iteflash) donald@donald-nb ~/trunk/src/platform/ec $ sudo ./build/it8380dev/util/iteflash -w ./build/it8380dev/ec.bin
Waiting for the EC power-on sequence ...CHIPID 8390, CHIPVER 82, Flash size 256 kB
Done.
CHIPID 8390, CHIPVER 82, Flash size 256 kB
Erasing chip...
/100%
Writing 262144 bytes at 0x00000000
Done.
/* ==SNAPSHOT END== */
Change-Id: I422db6f7007622f8be624a534a482e24d53a061a
Reviewed-on: https://chromium-review.googlesource.com/311205
Commit-Ready: Donald Huang <donald.huang@ite.com.tw>
Tested-by: Donald Huang <donald.huang@ite.com.tw>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Donald Huang <donald.huang@ite.com.tw>
1. change I2C frequency to 400K.
2. include the support for other it83xx series.
3. add "chip erase" command if the erase size equals to
flash's physical size.
4. remove 50h command.
5. always check write enable bit of the status reg, after
write enable command.
Signed-off-by: Dino Li <dino.li@ite.com.tw>
BRANCH=none
BUG=none
TEST=servo board + IT83xx EVB can erase, write, and read flash via i2c.
(iteflash --e, --w, and --r)
Change-Id: I0ac1eeaed5c243215d8817eb45b4b4fe0a7df26a
Reviewed-on: https://chromium-review.googlesource.com/283265
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Dino Li <dino.li@ite.com.tw>
Commit-Queue: Dino Li <dino.li@ite.com.tw>
Added ability to erase and program flash to iteflash.
BRANCH=none
BUG=chrome-os-partner:23576
TEST=generate random 192kB file, write it to the ITE chip, read flash
back and make sure file read in matches file written.
Change-Id: Id525b43e523a3d710ee65b623fec07800cf7f347
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176022
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>