diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-05-13 11:40:08 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-05-13 11:40:08 +0000 |
commit | d3e8b48c17d50ce0714ba942942849dcbb03bc4b (patch) | |
tree | 507387aa6b99ba2538d054a6662233927750ba19 /spi.h | |
parent | 2b4843c6b70441d8cfc95703c2186b677049c720 (diff) | |
download | flashrom-d3e8b48c17d50ce0714ba942942849dcbb03bc4b.tar.gz |
There are various reasons why a SPI command can fail. Among others, I
have seen the following problems:
- The SPI opcode is not supported by the controller. ICH-style
controllers exhibit this if SPI config is locked down.
- The address in in a prohibited area. This can happen on ICH for any
access (BBAR) and for writes in chipset write protected areas.
- There is no SPI controller.
Introduce separate error codes for unsupported opcode and prohibited
address.
Add the ability to adjust REMS and RES addresses to the minium supported
read address with the help of spi_get_valid_read_addr(). That function
needs to call SPI controller specific functions like reading BBAR on
ICH.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@500 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'spi.h')
-rw-r--r-- | spi.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -105,4 +105,8 @@ #define JEDEC_BYTE_PROGRAM_OUTSIZE 0x05 #define JEDEC_BYTE_PROGRAM_INSIZE 0x00 +/* Error codes */ +#define SPI_INVALID_OPCODE -2 +#define SPI_INVALID_ADDRESS -3 + #endif /* !__SPI_H__ */ |