-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: dma: siwx917: Add additional test for DMA driver
chan_blen_transfer test case in Zephyr upstream can be used to validate the siwx917 DMA driver. This test transfers a simple 48-byte of characters on two different channels. The added test (udma_tests) leverages the existing chan_blen_transfer test case. This additional test transfers large amounts of data with different data sizes (8-bit, 16-bit, and 32-bit) and verifies the reload function. This test case does not need to be pushed upstream. It can only reside in Downstream. Signed-off-by: Sai Santhosh Malae <[email protected]>
- Loading branch information
Showing
8 changed files
with
466 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(chan_blen_transfer) | ||
|
||
FILE(GLOB app_sources src/*.c) | ||
target_sources(app PRIVATE ${app_sources}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#Copyright (c) 2024 Silicon Laboratories Inc. | ||
#SPDX-License-Identifier: Apache-2.0 | ||
|
||
mainmenu "DMA Loop Transfer Test" | ||
|
||
source "Kconfig.zephyr" | ||
|
||
config DMA_TRANSFER_CHANNEL_NR_0 | ||
int "first DMA channel to use" | ||
default 0 | ||
|
||
config DMA_TRANSFER_CHANNEL_NR_1 | ||
int "second DMA channel to use" | ||
default 1 | ||
|
||
config DMA_LOOP_TRANSFER_NUMBER_OF_DMAS | ||
int "Number of DMAs to test" | ||
default 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_DMA_TRANSFER_CHANNEL_NR_0=1 | ||
CONFIG_DMA_TRANSFER_CHANNEL_NR_1=2 |
12 changes: 12 additions & 0 deletions
12
tests/drivers/dma/udma_tests/boards/siwx917_rb4338a.overlay
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright (c) 2024 Silicon Laboratories Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&udma0 | ||
{ | ||
status = "okay"; | ||
}; | ||
|
||
tst_dma0: &udma0{}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CONFIG_DMA=y | ||
CONFIG_ZTEST=y | ||
CONFIG_LOG=y | ||
CONFIG_DMA_LOG_LEVEL_INF=y |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright (c) 2024 Silicon Laboratories Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/kernel.h> | ||
#include <zephyr/ztest.h> | ||
|
||
ZTEST_SUITE(dma_m2m, NULL, NULL, NULL, NULL, NULL); |
Oops, something went wrong.