Conversation
DMA status check The ASPEED I3C controller reuses the PIO FIFO in DMA mode. When transfer errors or aborts occur, the interrupt may be raised before the DMA engine completes the transfer, leading to potential data corruption if the FIFO is reset immediately. Add aspeed_pio_fifo_reset() function that: - Polls WDMA_DBG_LO and RDMA_DBG_LO registers for I3C_DMA_DBG_LO_BUSY bit - Uses readl_poll_timeout_atomic() with 100ms timeout for reliable polling - Only resets PIO FIFOs after confirming DMA engines are idle - Replaces direct FIFO reset calls on transfer aborts Also add DMA debug register definitions and status bit masks to vendor_aspeed.h to support the polling mechanism. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
for ASPEED The ASPEED I3C controller reuses PIO FIFO in DMA mode, but transfer errors were not clearing the FIFO properly. This causes data corruption issues when sending consecutive Regular Data Transfer Commands. When the first transfer gets NACKed, its data remains in the PIO FIFO. Without clearing the FIFO, subsequent transfers will: - Read shifted/stale data from the previous failed transfer - Reuse corrupted data leading to incorrect transfer results Add aspeed_pio_fifo_reset() call on INTR_TRANSFER_ERR to ensure the PIO FIFO is properly cleared before the controller is resumed. This prevents data contamination between transfers and ensures data integrity for subsequent operations. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
aspeed fixes to reset the DMA FIFO buffers in case of errors.