summaryrefslogtreecommitdiff
path: root/dummyflasher.c
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-06-20 10:58:32 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-06-20 10:58:32 +0000
commit9a74a84aa4ee8f4ce7329e902df61c22a2c512d5 (patch)
treeaf751b638928cfed22ad9411d0cb7169fe9feef8 /dummyflasher.c
parentb2a0b1a386631e5af0fd6fb36517f64066a3017b (diff)
downloadflashrom-9a74a84aa4ee8f4ce7329e902df61c22a2c512d5.tar.gz
Add SPI chip read support to the dummy flasher. This allows using the
dummy flasher for SPI read debugging. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1053 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'dummyflasher.c')
-rw-r--r--dummyflasher.c8
1 files changed, 8 insertions, 0 deletions
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 @@ 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);
+}
+