Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ot] hw/opentitan: ot_spi_host: rework SPI Host #139

Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fbda5a4
[ot] hw/opentitan: ot_spi_host: add missing function name to log mess…
rivos-eblot Feb 6, 2025
8062500
[ot] hw/opentitan: ot_spi_host: remove banked CONFIGOPTS management
rivos-eblot Feb 11, 2025
ed7a1db
[ot] hw/opentitan: ot_spi_host: add PCLK property
rivos-eblot Feb 5, 2025
65588b6
[ot] hw/riscv: ot_earlgrey: configure SPI host clocks
rivos-eblot Feb 5, 2025
7198a15
[ot] hw/riscv: ot_darjeeling: configure SPI host clock
rivos-eblot Feb 7, 2025
364b4d4
[ot] hw/opentitan: ot_spi_host: restore reduced status trace configur…
rivos-eblot Feb 10, 2025
37b7093
[ot] hw/opentitan: ot_spi_host: fix STATUS.active bit behavior
rivos-eblot Feb 5, 2025
3630c49
[ot] hw/opentitan: ot_spi_host: add experimental clock pacing
rivos-eblot Feb 5, 2025
23ce683
[ot] hw/opentitan: ot_spi_host: fix internal reset
rivos-eblot Feb 6, 2025
d6cdb33
[ot] hw/opentitan: ot_spi_host: remove bottom half that has been depr…
rivos-eblot Feb 7, 2025
ac220c0
[ot] hw/opentitan: ot_spi_host: remove duplicate code
rivos-eblot Feb 7, 2025
ea8b7da
[ot] hw/opentitan: ot_spi_host: resume command execution even on error
rivos-eblot Feb 7, 2025
f464049
[ot] hw/opentitan: ot_spi_host: rework command FIFO management
rivos-eblot Feb 10, 2025
0a0115a
[ot] hw/opentitan: ot_spi_host: deprecated fsm.active bit
rivos-eblot Feb 10, 2025
724f581
[ot] hw/opentitan: ot_spi_host: add command status to ot_spi_host_tra…
rivos-eblot Feb 10, 2025
4db13fa
[ot] hw/opentitan: ot_spi_host: refactor FSM scheduling
rivos-eblot Feb 10, 2025
47b198f
[ot] hw/opentitan: ot_spi_host: fix TX/RX stall management on new com…
rivos-eblot Feb 10, 2025
d6a10f6
[ot] hw/opentitan: ot_spi_host: add missing const qualifiers
rivos-eblot Feb 10, 2025
8b3a59d
[ot] hw/opentitan: ot_spi_host: ensure invalid CSID is a no-op on SPI…
rivos-eblot Feb 10, 2025
0517170
[ot] hw/opentitan: ot_spi_host: fix comment style
rivos-eblot Feb 10, 2025
92a8ec0
[ot] hw/opentitan: ot_spi_host: fix ResettableAPI usage
rivos-eblot Feb 12, 2025
63a7c2b
[ot] hw/opentitan: ot_spi_host: remove unused constant
rivos-eblot Feb 12, 2025
1063c4c
[ot] docs/opentitan: earlgrey & darjeeling: update SPI Host documenta…
rivos-eblot Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[ot] hw/opentitan: ot_spi_host: fix STATUS.active bit behavior
Documentation was misleading: "the command is complete when STATUS.ACTIVE goes low."
It turns out STATUS.active goes low when the last pushed command is completed,
in other words, STATUS.active is not released as soon as a command is complete.

Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
rivos-eblot committed Feb 11, 2025
commit 37b70933040cca26c0dd3183e80b2acb76e4c4d1
6 changes: 4 additions & 2 deletions hw/opentitan/ot_spi_host.c
Original file line number Diff line number Diff line change
@@ -884,8 +884,10 @@ static void ot_spi_host_post_fsm(void *opaque)
/* retire command */
cmdfifo_pop(s->cmd_fifo, NULL);

/* "the command is complete when STATUS.ACTIVE goes low." */
s->fsm.active = false;
/* release active only if the last pushed command has been retired */
if (cmdfifo_is_empty(s->cmd_fifo)) {
s->fsm.active = false;
}
}

ot_spi_host_update_regs(s);