summaryrefslogtreecommitdiffstats
path: root/bitbang_spi.c
diff options
context:
space:
mode:
authorRick Altherr <rick@oxidecomputer.com>2021-12-13 17:10:00 -0800
committerNico Huber <nico.h@gmx.de>2022-01-14 15:41:20 +0000
commit3ae04a1204ab724689dadeac0548aadd5e5eb088 (patch)
tree0a379808d042e283adc3e327860c84adc0f8e644 /bitbang_spi.c
parent89c73b5a746088fb303f2f69c7107b9e2d386a79 (diff)
downloadflashrom-3ae04a1204ab724689dadeac0548aadd5e5eb088.tar.gz
flashrom-3ae04a1204ab724689dadeac0548aadd5e5eb088.tar.bz2
flashrom-3ae04a1204ab724689dadeac0548aadd5e5eb088.zip
dediprog: wait for spi bulk read xfers to finish
dediprog_bulk_read_poll()'s finish argument allows it to be used in two distinct cases: where dediprog_bulk_read_poll will be called as part of a loop (finish=0) and where dediprog_bulk_read_poll should wait for all outstanding transfers to finish (finish=1). In both cases, dediprog_bulk_read_poll() calls libusb to process events with a 10 second timeout. After dediprog_spi_bulk_read() has queued the last transfers, it calls dediprog_bulk_read_poll() with finish=0 when it should be finish=1. finish=0 just happens to work because frequently the transfers finish in the 10 second timeout. Signed-off-by: Rick Altherr <rick@oxidecomputer.com> Change-Id: If7cb541742c8620358c8e04275d8316131b2d1ab Reviewed-on: https://review.coreboot.org/c/flashrom/+/60087 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'bitbang_spi.c')
0 files changed, 0 insertions, 0 deletions