From 1b0ba893529cf93ae54b91607d93d3ad49c259e5 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sun, 20 Jun 2010 10:58:32 +0000 Subject: Add SPI chip read support to the dummy flasher This allows using the dummy flasher for SPI read debugging. Corresponding to flashrom svn r1053. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Sean Nelson --- dummyflasher.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'dummyflasher.c') diff --git a/dummyflasher.c b/dummyflasher.c index 8ebd695..b543222 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -23,6 +23,7 @@ #include #include #include "flash.h" +#include "chipdrivers.h" int dummy_init(void) { @@ -157,3 +158,10 @@ int dummy_spi_send_command(unsigned int writecnt, unsigned int readcnt, msg_pspew("\n"); return 0; } + +int dummy_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) +{ + /* Maximum read length is unlimited, use 64kB. */ + return spi_read_chunked(flash, buf, start, len, 64 * 1024); +} + -- cgit v1.1