dummyflasher: Add a frequency parameter
This adds a frequency parameter which will be used to calculate a
delay that will occur after sending a command. Note: this does not
affect chip read/write functions as that would be better handled
by adding delay periods specific to the target chip.
This is useful for testing behavior of programs and scripts which
invoke flashrom or depend on its behavior, such as power management
daemons or programs that share IPC locks. It can also be useful for
testing the overhead of repeated delays.
Example to emulate reading 1Mbyte flash at 8MHz:
sudo flashrom -p dummy:freq=8MHz,emulate=VARIABLE_SIZE,size=1M -r /tmp/foo.bin
BUG=chromium:400641
BRANCH=none
TEST=Tested "-p dummy:freq=" with a few different sizes and units, checked
that it err'd out if I specified invalid units.
Change-Id: I572ef2238172f26b6ffaf0000dc17c59674307bc
Reviewed-on: https://chromium-review.googlesource.com/217381
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
1 file changed