summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/intel/apollolake/spi.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/soc/intel/apollolake/spi.c b/src/soc/intel/apollolake/spi.c
index 85bc0b6a32..8cb8aa5d6d 100644
--- a/src/soc/intel/apollolake/spi.c
+++ b/src/soc/intel/apollolake/spi.c
@@ -313,8 +313,16 @@ static int nuclear_spi_write(struct spi_flash *flash,
static int nuclear_spi_status(struct spi_flash *flash, uint8_t *reg)
{
- printk(BIOS_DEBUG, "NOT IMPLEMENTED: %s() !!!\n", __func__);
- return E_NOT_IMPLEMENTED;
+ int ret;
+ BOILERPLATE_CREATE_CTX(ctx);
+
+ ret = exec_sync_hwseq_xfer(ctx, SPIBAR_HSFSTS_CYCLE_RD_STATUS, 0,
+ sizeof(*reg));
+ if (ret != SUCCESS)
+ return ret;
+
+ drain_xfer_fifo(ctx, reg, sizeof(*reg));
+ return ret;
}
static struct spi_slave boot_spi CAR_GLOBAL;