diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-06-20 10:58:32 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-06-20 10:58:32 +0000 |
commit | 32017fda9157c920801c6806d1589fe1ef1e7a6d (patch) | |
tree | af751b638928cfed22ad9411d0cb7169fe9feef8 /dummyflasher.c | |
parent | 2326d3fd952fcddc4e0e94fdd3239c864c311241 (diff) | |
download | flashrom-32017fda9157c920801c6806d1589fe1ef1e7a6d.zip flashrom-32017fda9157c920801c6806d1589fe1ef1e7a6d.tar.gz |
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>
Diffstat (limited to 'dummyflasher.c')
-rw-r--r-- | dummyflasher.c | 8 |
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); +} + |