remoteproc: adi: replace MDMA memcpy with memcpy_toio for LDR load#3268
Open
vasbimpikasadi wants to merge 1 commit into
Open
Conversation
MDMA writes to SHARC L2 memory (0x200xxxxx) are silently rejected at the bus fabric level on ADSP-SC573 and ADSP-SC589. The MDMA engine stalls waiting for a write ACK that never comes (DMA_STAT.RUN=4, IRQERR=0), and the remoteproc driver times out. Use memcpy_toio/memset_io with the L1 and L2 virtual mappings already established in probe (L1_shared_base, L2_shared_base) instead of the MDMA engine. This follows the same pattern as rproc_elf_load_segments() in remoteproc_elf_loader.c which uses memcpy_toio when the target region is IOMEM. Remove the now-unused MDMA infrastructure: dmaengine_get/put, dma_alloc_coherent bounce buffer, SPU permission setup for MDMA channels, and the completion callback. Tested on ADSP-SC589-MINI with a synthetic 128 KB L2 stress LDR image. Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@analog.com>
|
|
||
| if (!tx) { | ||
| dev_err(rproc_data->dev, "Failed to allocate dma transaction\n"); | ||
| if (addr >= rproc_data->l1_da_range[0] && |
There was a problem hiding this comment.
where this ranges comes from L2 only for vring's or L3. Firmware is loaded to L3
| return -EINVAL; | ||
| } | ||
|
|
||
| void set_spu_securep_msec(u16 n, bool msec); |
There was a problem hiding this comment.
In comment section
'''
MDMA writes to SHARC L2 memory (0x200xxxxx) are silently rejected at the bus fabric level on ADSP-SC573 and ADSP-SC589. The MDMA engine stalls waiting for a write ACK that never comes (DMA_STAT.RUN=4, IRQERR=0), and the remoteproc driver times out.
''' does it means that SPU is enabled , when transaction is running and actually that error because SPU is enabled by other cores? And isn't this just suppressing error rather fixing underlying issue?
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.
MDMA writes to SHARC L2 memory (0x200xxxxx) are silently rejected at the bus fabric level on ADSP-SC573 and ADSP-SC589. The MDMA engine stalls waiting for a write ACK that never comes (DMA_STAT.RUN=4, IRQERR=0), and the remoteproc driver times out.
Use memcpy_toio/memset_io with the L1 and L2 virtual mappings already established in probe (L1_shared_base, L2_shared_base) instead of the MDMA engine. This follows the same pattern as rproc_elf_load_segments() in remoteproc_elf_loader.c which uses memcpy_toio when the target region is IOMEM.
Remove the now-unused MDMA infrastructure: dmaengine_get/put, dma_alloc_coherent bounce buffer, SPU permission setup for MDMA channels, and the completion callback.
Tested on ADSP-SC589-MINI with a synthetic 128 KB L2 stress LDR image.
PR Description
necessary to understand them. List any dependencies required for this change.
any space), or simply check them after publishing the PR.
description and try to push all related PRs simultaneously.
PR Type
PR Checklist