tests: dma: loop_transfer: Convert to DEVICE_DT_GET
Convert test to use DEVICE_DT_GET via a nodelabel. Introduce a test_dma devicetree nodelabel to reference the DMA controller the test should use. Signed-off-by: Kumar Gala <galak@kernel.org>
This commit is contained in:
parent
bf66f92eb5
commit
b1a8246b56
71 changed files with 240 additions and 54 deletions
|
@ -5,10 +5,6 @@ mainmenu "DMA Loop Transfer Test"
|
||||||
|
|
||||||
source "Kconfig.zephyr"
|
source "Kconfig.zephyr"
|
||||||
|
|
||||||
config DMA_LOOP_TRANSFER_DRV_NAME
|
|
||||||
string "DMA device name to use for test"
|
|
||||||
default "DMA_0"
|
|
||||||
|
|
||||||
config DMA_LOOP_TRANSFER_CHANNEL_NR
|
config DMA_LOOP_TRANSFER_CHANNEL_NR
|
||||||
int "DMA channel to use"
|
int "DMA channel to use"
|
||||||
default 0
|
default 0
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma1 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &lpgpdma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &lpgpdma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma_lpsr0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma_lpsr0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma0 { };
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma0 { };
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
&dma1 {
|
test_dma: &dma1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma1 { };
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma1 { };
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_2"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=0
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=0
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma2 {
|
test_dma: &dma2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_2"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma2 { };
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_NOCACHE_MEMORY=y
|
CONFIG_NOCACHE_MEMORY=y
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_2"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=0
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=0
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma2 { };
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_NOCACHE_MEMORY=y
|
CONFIG_NOCACHE_MEMORY=y
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_2"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=0
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=0
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma2 {
|
test_dma: &dma2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=6
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=6
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=2
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=2
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=2
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=2
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_NOCACHE_MEMORY=y
|
CONFIG_NOCACHE_MEMORY=y
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
&dma1 {
|
test_dma: &dma1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma1 { };
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
&dma1 {
|
test_dma: &dma1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_2"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=1
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma2 {
|
test_dma: &dma2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dmac { };
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &dma1 { };
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMAMUX_1"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=11
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dmamux1 {
|
test_dma: &dmamux1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="EDMA"
|
|
||||||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=5
|
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=5
|
||||||
|
|
7
tests/drivers/dma/loop_transfer/boards/twr_ke18f.overlay
Normal file
7
tests/drivers/dma/loop_transfer/boards/twr_ke18f.overlay
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
test_dma: &edma { };
|
|
@ -68,8 +68,6 @@ static char tx_data[] = DATA;
|
||||||
static __aligned(16) char rx_data[TRANSFER_LOOPS][RX_BUFF_SIZE] = { { 0 } };
|
static __aligned(16) char rx_data[TRANSFER_LOOPS][RX_BUFF_SIZE] = { { 0 } };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DMA_DEVICE_NAME CONFIG_DMA_LOOP_TRANSFER_DRV_NAME
|
|
||||||
|
|
||||||
volatile uint32_t transfer_count;
|
volatile uint32_t transfer_count;
|
||||||
volatile uint32_t done;
|
volatile uint32_t done;
|
||||||
static struct dma_config dma_cfg = {0};
|
static struct dma_config dma_cfg = {0};
|
||||||
|
@ -120,8 +118,7 @@ static int test_loop(void)
|
||||||
static int chan_id;
|
static int chan_id;
|
||||||
|
|
||||||
test_case_id = 0;
|
test_case_id = 0;
|
||||||
TC_PRINT("DMA memory to memory transfer started on %s\n",
|
TC_PRINT("DMA memory to memory transfer started\n");
|
||||||
DMA_DEVICE_NAME);
|
|
||||||
TC_PRINT("Preparing DMA Controller\n");
|
TC_PRINT("Preparing DMA Controller\n");
|
||||||
|
|
||||||
#if CONFIG_NOCACHE_MEMORY
|
#if CONFIG_NOCACHE_MEMORY
|
||||||
|
@ -131,9 +128,9 @@ static int test_loop(void)
|
||||||
|
|
||||||
memset(rx_data, 0, sizeof(rx_data));
|
memset(rx_data, 0, sizeof(rx_data));
|
||||||
|
|
||||||
dma = device_get_binding(DMA_DEVICE_NAME);
|
dma = DEVICE_DT_GET(DT_NODELABEL(test_dma));
|
||||||
if (!dma) {
|
if (!device_is_ready(dma)) {
|
||||||
TC_PRINT("Cannot get dma controller\n");
|
TC_PRINT("dma controller device is not ready\n");
|
||||||
return TC_FAIL;
|
return TC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,8 +205,7 @@ static int test_loop_suspend_resume(void)
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
test_case_id = 1;
|
test_case_id = 1;
|
||||||
TC_PRINT("DMA memory to memory transfer started on %s\n",
|
TC_PRINT("DMA memory to memory transfer started\n");
|
||||||
DMA_DEVICE_NAME);
|
|
||||||
TC_PRINT("Preparing DMA Controller\n");
|
TC_PRINT("Preparing DMA Controller\n");
|
||||||
|
|
||||||
#if CONFIG_NOCACHE_MEMORY
|
#if CONFIG_NOCACHE_MEMORY
|
||||||
|
@ -219,9 +215,9 @@ static int test_loop_suspend_resume(void)
|
||||||
|
|
||||||
memset(rx_data, 0, sizeof(rx_data));
|
memset(rx_data, 0, sizeof(rx_data));
|
||||||
|
|
||||||
dma = device_get_binding(DMA_DEVICE_NAME);
|
dma = DEVICE_DT_GET(DT_NODELABEL(test_dma));
|
||||||
if (!dma) {
|
if (!device_is_ready(dma)) {
|
||||||
TC_PRINT("Cannot get dma controller\n");
|
TC_PRINT("dma controller device is not ready\n");
|
||||||
return TC_FAIL;
|
return TC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue