summaryrefslogtreecommitdiff
path: root/spi.h
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-11-24 00:20:03 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-11-24 00:20:03 +0000
commit1e010a4aead9b61e4ea3ae776f5ef1c59a8c5adb (patch)
tree1978ce52ae758b879635c7a8a9c2651f739844f8 /spi.h
parentc46274b04a255a059596a02cc45b583a0453d9e1 (diff)
downloadflashrom-1e010a4aead9b61e4ea3ae776f5ef1c59a8c5adb.tar.gz
Add Bus Pirate SPI support to flashrom.
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. 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> Tested-by: Sean Nelson <audiohacked@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@772 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'spi.h')
-rw-r--r--spi.h1
1 files changed, 1 insertions, 0 deletions
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