summaryrefslogtreecommitdiff
path: root/src/drivers/spi/atmel.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2020-01-11 16:52:42 -0700
committerAaron Durbin <adurbin@chromium.org>2020-01-16 15:21:35 +0000
commit937931ea04c27986312d261f0fbd2eff797615c7 (patch)
treea814b311dba12dd90f42e306b58e60a3440cac5b /src/drivers/spi/atmel.c
parentf584f19efc58ba3c80a462024ae680320b17b9ce (diff)
downloadcoreboot-937931ea04c27986312d261f0fbd2eff797615c7.tar.xz
drivers/spi/spi_flash: add missing status() command callbacks
The adesto, amic, atmel, and stmicro spi flash drivers didn't have the status() call back. These parts do support the status command retrieval. Fill them in accordingly. Change-Id: Ie0e63bec844b8e01e292ef8c4df707494df02e69 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38377 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/drivers/spi/atmel.c')
-rw-r--r--src/drivers/spi/atmel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/spi/atmel.c b/src/drivers/spi/atmel.c
index 64bc9f86f3..ad9e75b4f3 100644
--- a/src/drivers/spi/atmel.c
+++ b/src/drivers/spi/atmel.c
@@ -107,6 +107,7 @@ static const struct spi_flash_ops spi_flash_ops = {
.read = spi_flash_cmd_read,
.write = spi_flash_cmd_write_page_program,
.erase = spi_flash_cmd_erase,
+ .status = spi_flash_cmd_status,
};
int spi_flash_probe_atmel(const struct spi_slave *spi, u8 *idcode,
@@ -136,6 +137,7 @@ int spi_flash_probe_atmel(const struct spi_slave *spi, u8 *idcode,
flash->size = flash->sector_size * params->sectors_per_block *
params->nr_blocks;
flash->erase_cmd = CMD_AT25_SE;
+ flash->status_cmd = CMD_AT25_RDSR;
flash->pp_cmd = CMD_AT25_PP;
flash->wren_cmd = CMD_AT25_WREN;