From a2f1b953401d071b45eb51bc21ab174759fcc13f Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 27 Aug 2012 11:10:43 -0700 Subject: SPI: opmenu special case for WREN as atomic prefix The code that attempts to use the opmenu needs to have a special case for write enable now that it is handled as an atomic prefix and not as a standalone opcode. To test, ensure that runtime SPI write via ELOG is successful by checking the event log for a kernel shutdown reason code: 5 | 2012-08-27 11:09:48 | Kernel Event | Clean Shutdown 6 | 2012-08-27 11:09:50 | System boot | 26 7 | 2012-08-27 11:09:50 | System Reset Change-Id: I527638ef3e2a5ab100192c5be6e6b3b40916295a Signed-off-by: Duncan Laurie Reviewed-on: http://review.coreboot.org/1710 Reviewed-by: Marc Jones Tested-by: build bot (Jenkins) --- src/include/spi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/include') diff --git a/src/include/spi.h b/src/include/spi.h index bee851ea97..7d195d002a 100644 --- a/src/include/spi.h +++ b/src/include/spi.h @@ -44,6 +44,9 @@ #define SPI_XFER_BEGIN 0x01 /* Assert CS before transfer */ #define SPI_XFER_END 0x02 /* Deassert CS after transfer */ +/* SPI opcodes */ +#define SPI_OPCODE_WREN 0x06 + /*----------------------------------------------------------------------- * Representation of a SPI slave, i.e. what we're communicating with. * -- cgit v1.2.3