Skip to content

Commit 1b2a7ec

Browse files
Chris Friedtcfriedt
authored andcommitted
tests: drivers: dma: chan_blen: 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 5afcac5)
1 parent 9d2533f commit 1b2a7ec

File tree

1 file changed

+5
-0
lines changed
  • tests/drivers/dma/chan_blen_transfer/src

1 file changed

+5
-0
lines changed

tests/drivers/dma/chan_blen_transfer/src/test_dma.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,13 @@ static int test_task(uint32_t chan_id, uint32_t blen)
7979
TC_PRINT("Starting the transfer\n");
8080
(void)memset(rx_data, 0, sizeof(rx_data));
8181
dma_block_cfg.block_size = sizeof(tx_data);
82+
#ifdef CONFIG_DMA_64BIT
83+
dma_block_cfg.source_address = (uint64_t)tx_data;
84+
dma_block_cfg.dest_address = (uint64_t)rx_data;
85+
#else
8286
dma_block_cfg.source_address = (uint32_t)tx_data;
8387
dma_block_cfg.dest_address = (uint32_t)rx_data;
88+
#endif
8489

8590
if (dma_config(dma, chan_id, &dma_cfg)) {
8691
TC_PRINT("ERROR: transfer\n");

0 commit comments

Comments
 (0)