From 5cca01f3943d888f9ee5f1efcf9faa0269bf8533 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 24 Nov 2009 00:20:03 +0000 Subject: 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 Corresponding to flashrom svn r772. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Stefan Reinauer Acked-by: Sean Nelson --- spi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'spi.h') diff --git a/spi.h b/spi.h index 3050ccf..2fa7dcd 100644 --- a/spi.h +++ b/spi.h @@ -106,6 +106,7 @@ #define JEDEC_BYTE_PROGRAM_INSIZE 0x00 /* Error codes */ +#define SPI_GENERIC_ERROR -1 #define SPI_INVALID_OPCODE -2 #define SPI_INVALID_ADDRESS -3 #define SPI_INVALID_LENGTH -4 -- cgit v1.1