-
Notifications
You must be signed in to change notification settings - Fork 13
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
RFC: LiteSDCard: Add support for DMA/data completion interrupts #16
base: master
Are you sure you want to change the base?
Commits on Oct 14, 2023
-
mmc: litex_mmc: use BIT() macros for IRQ registers
Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f3fdb53 - Browse repository at this point
Copy the full SHA f3fdb53View commit details -
mmc: litex_mmc: move completion setup to irq_init
Initializing completion(s) belongs with the rest of the IRQ support setup, in `irq_init()`. Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c040c28 - Browse repository at this point
Copy the full SHA c040c28View commit details -
mmc: litex_mmc: wait for data completion outside cmd handler
Setting up DMA data transfers happens outside (and before) the call to `send_cmd()`; therefore, wait for their completion also outside (and after) the `send_cmd()` call. Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1af3e8a - Browse repository at this point
Copy the full SHA 1af3e8aView commit details -
mmc: litex_mmc: isolate cmd irq heuristic
Separate the criteria for selecting commands that should use IRQ into an explicit Boolean flag. Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1f7136d - Browse repository at this point
Copy the full SHA 1f7136dView commit details -
mmc: litex_mmc: fix cmd irq/completion sequencing
To ensure interrupts cannot be missed, we must (re)initialize completions *before* setting up any transaction that will result in the assertion of an interrupt. Waiting for completion should follow *after* the hardware transaction setup, and before proceeding with e.g. a polling loop acting as fall-back for when IRQ support is unavailable. Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5a7c053 - Browse repository at this point
Copy the full SHA 5a7c053View commit details -
mmc: litex_mmc: switch cmd_done irq to edge-triggered
Switch from *level* to *edge* triggered IRQ mode for the command completion interrupt. The SDIRQ_CMD_DONE interrupt will no longer have to be toggled by the interrupt handler, laying the groundwork for supporting (edge-triggered) data/dma completion interrupts in a subsequent patch. NOTE: this requires the underlying LiteX gateware to be newer than commit #XXXXXXXX ("integration/soc/add_sdcard: switch to edge-triggered cmd-done irq") Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f1557fa - Browse repository at this point
Copy the full SHA f1557faView commit details -
mmc: litex_mmc: use irq for all commands
Instead of heuristically selecting "slow" commands to use interrupts, leaving "fast" ones to use polling, apply IRQ handling equally to *all* commands. The measured transfer times decreased slightly for some LiteX designs (e.g., using VexRiscv/NaxRiscv), and did not increase measurably for others (e.g., using RocketChip). Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66074a0 - Browse repository at this point
Copy the full SHA 66074a0View commit details -
mmc: litex_mmc: turn off IRQs on driver removal
Ensure that interrupts are turned off as part of removing the driver. Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 10240a9 - Browse repository at this point
Copy the full SHA 10240a9View commit details -
mmc: litex_mmc: ack all handled IRQs together
Collect handled IRQs and ack them all together with a single MMIO port write. Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1491670 - Browse repository at this point
Copy the full SHA 1491670View commit details -
mmc: litex_mmc: add IRQ support for DMA data xfers
Add support for utilizing interrupts generated by LiteSDCard when DMA data transfers complete. Signed-off-by: Gabriel Somlo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b695cee - Browse repository at this point
Copy the full SHA b695ceeView commit details