diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-05-13 11:40:08 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-05-13 11:40:08 +0000 |
commit | caf58345e90e6862d66918798c896288604946fc (patch) | |
tree | 507387aa6b99ba2538d054a6662233927750ba19 /ichspi.c | |
parent | 01b586a0b29e6ffc559eed584369a63a6be27cac (diff) | |
download | flashrom-caf58345e90e6862d66918798c896288604946fc.zip flashrom-caf58345e90e6862d66918798c896288604946fc.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.
Corresponding to flashrom svn r500.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'ichspi.c')
-rw-r--r-- | ichspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -767,7 +767,7 @@ int ich_spi_command(unsigned int writecnt, unsigned int readcnt, /* unknown / not programmed command */ if (opcode_index == -1) { printf_debug("Invalid OPCODE 0x%02x\n", cmd); - return 1; + return SPI_INVALID_OPCODE; } opcode = &(curopcodes->opcode[opcode_index]); |