Skip to content

Commit b595743

Browse files
committed
[ot] hw/opentitan: ot_spi_device: Set WEL/BUSY bits in UPLOAD_CMD_FIFO
Change-Id: Ic52eed4009933cd4fc09da4a78fbd05e3de0822e Signed-off-by: Amit Kumar-Hermosillo <amitkh@google.com>
1 parent 13e5cb4 commit b595743

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

hw/opentitan/ot_spi_device.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,12 @@ ot_spi_device_spi_regs_read(void *opaque, hwaddr addr, unsigned size)
19831983
case R_UPLOAD_CMDFIFO:
19841984
if (!fifo8_is_empty(&f->cmd_fifo)) {
19851985
val32 = (uint32_t)fifo8_pop(&f->cmd_fifo);
1986+
val32 = FIELD_DP32(val32, UPLOAD_CMDFIFO, BUSY,
1987+
FIELD_EX32(s->spi_regs[R_FLASH_STATUS],
1988+
FLASH_STATUS, BUSY));
1989+
val32 = FIELD_DP32(val32, UPLOAD_CMDFIFO, WEL,
1990+
FIELD_EX32(s->spi_regs[R_FLASH_STATUS],
1991+
FLASH_STATUS, WEL));
19861992
} else {
19871993
qemu_log_mask(LOG_UNIMP, "%s: %s: CMD_FIFO is empty\n", __func__,
19881994
s->ot_id);

0 commit comments

Comments
 (0)