diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-11-24 00:20:03 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-11-24 00:20:03 +0000 |
commit | 5cca01f3943d888f9ee5f1efcf9faa0269bf8533 (patch) | |
tree | 1978ce52ae758b879635c7a8a9c2651f739844f8 /spi.c | |
parent | e51ea10a8889544b942d3490bb721f160fe09517 (diff) | |
download | flashrom-5cca01f3943d888f9ee5f1efcf9faa0269bf8533.tar.gz flashrom-5cca01f3943d888f9ee5f1efcf9faa0269bf8533.tar.bz2 flashrom-5cca01f3943d888f9ee5f1efcf9faa0269bf8533.zip |
Cleanly validate ICH SPI preopcodes
The code should work on Linux/*BSD/MacOSX and relies on the serial code
implementation in serial.c. Support for additional platforms (Windows)
will have to be added to serial.c for this to work. For tests without a
Bus Pirate (or with non-functional serial code) it is possible to
#define FAKE_COMMUNICATION in buspirate_spi.c.
Thanks to Sean Nelson for the SPI mode settings code. I tweaked it a bit
to make configuration from a commandline easier should anybody want that
feature.
Tested-by: Sean Nelson <audiohacked@gmail.com>
Corresponding to flashrom svn r772.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'spi.c')
-rw-r--r-- | spi.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -100,6 +100,15 @@ const struct spi_programmer spi_programmer[] = { }, #endif +#if BUSPIRATE_SPI_SUPPORT == 1 + { /* SPI_CONTROLLER_BUSPIRATE */ + .command = buspirate_spi_send_command, + .multicommand = default_spi_send_multicommand, + .read = buspirate_spi_read, + .write_256 = spi_chip_write_1, + }, +#endif + {}, /* This entry corresponds to SPI_CONTROLLER_INVALID. */ }; |