Skip to content

Commit 25616b1

Browse files
Chris Friedtcfriedt
authored andcommitted
tests: drivers: dma: loop: support 64-bit dma
The test does not appear to support 64-bit DMA * mitigate compiler warning * support 64-bit addressing mode with `CONFIG_DMA_64BIT` Signed-off-by: Chris Friedt <[email protected]> (cherry picked from commit 8c6c967)
1 parent f725190 commit 25616b1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/drivers/dma/loop_transfer/src/test_dma_loop.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ static void test_transfer(const struct device *dev, uint32_t id)
5757
transfer_count++;
5858
if (transfer_count < TRANSFER_LOOPS) {
5959
dma_block_cfg.block_size = strlen(tx_data);
60+
#ifdef CONFIG_DMA_64BIT
61+
dma_block_cfg.source_address = (uint64_t)tx_data;
62+
dma_block_cfg.dest_address = (uint64_t)rx_data[transfer_count];
63+
#else
6064
dma_block_cfg.source_address = (uint32_t)tx_data;
6165
dma_block_cfg.dest_address = (uint32_t)rx_data[transfer_count];
66+
#endif
6267

6368
zassert_false(dma_config(dev, id, &dma_cfg),
6469
"Not able to config transfer %d",

0 commit comments

Comments
 (0)