mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 07:02:34 +02:00
Report if we are not able to disable AAI mode again
Corresponding to flashrom svn r1780. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
parent
87ace663df
commit
59c4d790bd
14
spi25.c
14
spi25.c
@ -1151,10 +1151,12 @@ int default_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int sta
|
|||||||
programmer_delay(10);
|
programmer_delay(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Use WRDI to exit AAI mode. This needs to be done before issuing any
|
/* Use WRDI to exit AAI mode. This needs to be done before issuing any other non-AAI command. */
|
||||||
* other non-AAI command.
|
result = spi_write_disable(flash);
|
||||||
*/
|
if (result != 0) {
|
||||||
spi_write_disable(flash);
|
msg_cerr("%s failed to disable AAI mode.\n", __func__);
|
||||||
|
return SPI_GENERIC_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
/* Write remaining byte (if any). */
|
/* Write remaining byte (if any). */
|
||||||
if (pos < start + len) {
|
if (pos < start + len) {
|
||||||
@ -1166,6 +1168,8 @@ int default_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int sta
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bailout:
|
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;
|
return SPI_GENERIC_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user