mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 06:23:18 +02:00
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>
This commit is contained in:
9
spi.c
9
spi.c
@ -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. */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user