diff options
author | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2014-04-26 16:13:09 +0000 |
---|---|---|
committer | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2014-04-26 16:13:09 +0000 |
commit | 14990a0ab3a35d34a89db08ddab6a654ffab6ba6 (patch) | |
tree | 649c9bf865c2160cdd0802bcd3246ea03a8d9cc7 /spi25.c | |
parent | 39d23cca49c04990d6f10178b2d84c79537e510d (diff) | |
download | flashrom-14990a0ab3a35d34a89db08ddab6a654ffab6ba6.tar.gz |
Report if we are not able to disable AAI mode again.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1780 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'spi25.c')
-rw-r--r-- | spi25.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1151,10 +1151,12 @@ int default_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int sta programmer_delay(10); } - /* Use WRDI to exit AAI mode. This needs to be done before issuing any - * other non-AAI command. - */ - spi_write_disable(flash); + /* Use WRDI to exit AAI mode. This needs to be done before issuing any other non-AAI command. */ + result = spi_write_disable(flash); + if (result != 0) { + msg_cerr("%s failed to disable AAI mode.\n", __func__); + return SPI_GENERIC_ERROR; + } /* Write remaining byte (if any). */ if (pos < start + len) { @@ -1166,6 +1168,8 @@ int default_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int sta return 0; bailout: - spi_write_disable(flash); + result = spi_write_disable(flash); + if (result != 0) + msg_cerr("%s failed to disable AAI mode.\n", __func__); return SPI_GENERIC_ERROR; } |