Skip to content

Commit 48e9de5

Browse files
SPRESENSEanchao
authored andcommitted
arch: cxd56xx: Fix DMA transfer for large memory size
When using a dummy memory address in DMA LLI transfers, do not update the memory address. Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
1 parent 536dec4 commit 48e9de5

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

arch/arm/src/cxd56xx/cxd56_dmac.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,11 @@ void cxd56_rxdmasetup(DMA_HANDLE handle, uintptr_t paddr, uintptr_t maddr,
941941
CXD56_DMAC_BSIZE4, CXD56_DMAC_BSIZE4, /* Dest / Src burst size (fixed) */
942942
CXD56_DMAC_MAX_SIZE);
943943

944-
dst += CXD56_DMAC_MAX_SIZE;
944+
if (di)
945+
{
946+
dst += CXD56_DMAC_MAX_SIZE;
947+
}
948+
945949
rest -= CXD56_DMAC_MAX_SIZE;
946950
}
947951

@@ -1012,7 +1016,11 @@ void cxd56_txdmasetup(DMA_HANDLE handle, uintptr_t paddr, uintptr_t maddr,
10121016
CXD56_DMAC_BSIZE1, CXD56_DMAC_BSIZE1, /* Dest / Src burst size (fixed) */
10131017
CXD56_DMAC_MAX_SIZE);
10141018

1015-
src += CXD56_DMAC_MAX_SIZE;
1019+
if (si)
1020+
{
1021+
src += CXD56_DMAC_MAX_SIZE;
1022+
}
1023+
10161024
rest -= CXD56_DMAC_MAX_SIZE;
10171025
}
10181026

0 commit comments

Comments
 (0)