1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

programmers: Allow opaque programmers to specify custom delay

The dummyprogrammer in the opaque case can have a NOP delay
to avoid wasting CPU time and energy.

BUG=b:266014935
TEST=builds

Change-Id: Ia86ad21f011214abc2aa0891a43559f91e2a9591
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/72424
Reviewed-by: Sam McNally <sammc@google.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Edward O'Callaghan
2023-01-25 14:15:33 +11:00
committed by Edward O'Callaghan
parent 31c5caa614
commit 0a6fa23924
2 changed files with 4 additions and 0 deletions

View File

@ -277,6 +277,9 @@ void programmer_delay(const struct flashctx *flash, unsigned int usecs)
} else if (flash->mst->buses_supported & BUS_PARALLEL) {
if (flash->mst->par.delay)
return flash->mst->par.delay(flash, usecs);
} else if (flash->mst->buses_supported & BUS_PROG) {
if (flash->mst->opaque.delay)
return flash->mst->opaque.delay(flash, usecs);
}
return default_delay(usecs);