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 <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
diff --git a/dummyflasher.c b/dummyflasher.c
index 8ebd695..b543222 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -23,6 +23,7 @@
 #include <ctype.h>
 #include <sys/types.h>
 #include "flash.h"
+#include "chipdrivers.h"
 
 int dummy_init(void)
 {
@@ -157,3 +158,10 @@
 	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);
+}
+