Add programmer-specific delay functions
Add external programmer delay functions so external programmers can
handle the delay on their own if needed.
Corresponding to flashrom svn r578.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Urja Rannikko <urjaman@gmail.com>
diff --git a/wbsio_spi.c b/wbsio_spi.c
index 045aa0e..554bf2a 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -159,7 +159,7 @@
OUTB(writearr[0], wbsio_spibase);
OUTB(mode, wbsio_spibase + 1);
- myusec_delay(10);
+ programmer_delay(10);
if (!readcnt)
return 0;
@@ -203,7 +203,7 @@
for (pos = 0; pos < size; pos++) {
spi_byte_program(pos, buf[pos]);
while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
- myusec_delay(10);
+ programmer_delay(10);
}
spi_write_disable();
return 0;