Fix handling of cmd_done flag#54
Conversation
…y when reaching IDLE state
|
cmd_done is also connected to a interrupt, while data_done is not. Some other drivers might depend on this behavior, like zephyrproject-rtos/zephyr#93816 The linux driver might also be effected. |
|
I reviewed the zephyr driver and I would assume it would still work with this fix. Can you try this @maass-hamburg ? What is the way to introduce such potentially breaking changes in litex? One way could be to also add an interrupt for data done and adapt the drivers to using that one so they should keep the same behavior as now and can decide later if they want to switch to the correct interrupt |
|
to remain backwards compatible, the existing cmd_done irq should use the zephyr driver expects, that the tx is completed when the cmd_done irq is fired. the only thing that would be allowed to run longer is the dma (only the memory write/sd card read). the other dma irq (memory read/sd card write) would fire before data_done and that would be a problem if we change it. |
add data_done irq, in prep for enjoy-digital/litesdcard#54 will take the former place of cmd_done, so we remain backwards compatible. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
|
Do I understand correctly that everything you mentioned @maass-hamburg is now implemented..? Before this could be merged, enjoy-digital/litex#2358 should also be merged, right? That driver does not use interrupt sources but reads the status register directly |
yes |
|
@enjoy-digital this looks fine |
|
Thanks @LnnrtS, @maass-hamburg, let's merge. |
This flag can already be set once a command response has been received.
Requires firmware fix