diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-11-01 22:07:04 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-11-01 22:07:04 +0000 |
commit | 2d695c8d9b10fbb08082a8bb34047405efc814f0 (patch) | |
tree | 4c85236da301f711301b7a49b0c213e7d7e2ab37 /flash.h | |
parent | 2b29a5e334096652802f7b046a7e1b91da2211e6 (diff) | |
download | flashrom-2d695c8d9b10fbb08082a8bb34047405efc814f0.zip flashrom-2d695c8d9b10fbb08082a8bb34047405efc814f0.tar.gz |
Add SPI flash emulation capability to the dummy programmer
You have to choose between
- no emulation
- ST M25P10.RES SPI flash chip (RES, page write)
- SST SST25VF040.REMS SPI flash chip (REMS, byte write)
- SST SST25VF032B SPI flash chip (RDID, AAI write)
Example usage: flashrom -p dummy:emulate=SST25VF032B
Flash image persistence is available as well.
Example usage: flashrom -p dummy:image=dummy_simulator.rom
Allow setting the max chunksize for page write with the dummy
programmer.
Example usage: flashrom -p dummy:spi_write_256_chunksize=5
Flash emulation is compiled in by default.
This code helped me find and fix various bugs in the SPI write code
as well as in the testsuite.
Corresponding to flashrom svn r1220.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>
Diffstat (limited to 'flash.h')
-rw-r--r-- | flash.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -207,6 +207,8 @@ void print_banner(void); void list_programmers_linebreak(int startcol, int cols, int paren); int selfcheck(void); int doit(struct flashchip *flash, int force, char *filename, int read_it, int write_it, int erase_it, int verify_it); +int read_buf_from_file(unsigned char *buf, unsigned long size, char *filename); +int write_buf_to_file(unsigned char *buf, unsigned long size, char *filename); #define OK 0 #define NT 1 /* Not tested */ |