Skip to content

Commit

Permalink
tests: drivers: dma: test dma_emul driver on native_posix boards
Browse files Browse the repository at this point in the history
Add support for testing the `dma_emul` driver which simply uses
software emulation (i.e. asynchronous memcpy in a workqueue) for
performing DMA operations.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
  • Loading branch information
cfriedt committed Dec 1, 2023
1 parent a953ae8 commit ad012d3
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 0 deletions.
@@ -0,0 +1 @@
CONFIG_DMA_EMUL=y
12 changes: 12 additions & 0 deletions tests/drivers/dma/chan_blen_transfer/boards/native_posix.overlay
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
status = "okay";
};

test_dma0: &dma { };
@@ -0,0 +1,2 @@
CONFIG_DMA_EMUL=y
CONFIG_DMA_64BIT=y
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
status = "okay";
};

test_dma0: &dma { };
3 changes: 3 additions & 0 deletions tests/drivers/dma/chan_blen_transfer/testcase.yaml
Expand Up @@ -5,6 +5,9 @@ tests:
- dma
tags:
- dma
integration_platforms:
- native_posix
- native_posix_64
filter: dt_nodelabel_enabled("test_dma0")
drivers.dma.chan_blen_transfer.low_footprint:
tags:
Expand Down
@@ -0,0 +1 @@
CONFIG_DMA_EMUL=y
12 changes: 12 additions & 0 deletions tests/drivers/dma/chan_link_transfer/boards/native_posix.overlay
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
status = "okay";
};

dma0: &dma { };
@@ -0,0 +1,2 @@
CONFIG_DMA_EMUL=y
CONFIG_DMA_64BIT=y
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
status = "okay";
};

dma0: &dma { };
4 changes: 4 additions & 0 deletions tests/drivers/dma/chan_link_transfer/testcase.yaml
Expand Up @@ -16,5 +16,9 @@ tests:
- mimxrt1024_evk
- lpcxpresso55s69_cpu0
- lpcxpresso55s36
- native_posix
- native_posix_64
integration_platforms:
- frdm_k64f
- native_posix
- native_posix_64
1 change: 1 addition & 0 deletions tests/drivers/dma/loop_transfer/boards/native_posix.conf
@@ -0,0 +1 @@
CONFIG_DMA_EMUL=y
12 changes: 12 additions & 0 deletions tests/drivers/dma/loop_transfer/boards/native_posix.overlay
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
status = "okay";
};

test_dma0: &dma { };
2 changes: 2 additions & 0 deletions tests/drivers/dma/loop_transfer/boards/native_posix_64.conf
@@ -0,0 +1,2 @@
CONFIG_DMA_EMUL=y
CONFIG_DMA_64BIT=y
12 changes: 12 additions & 0 deletions tests/drivers/dma/loop_transfer/boards/native_posix_64.overlay
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
status = "okay";
};

test_dma0: &dma { };
3 changes: 3 additions & 0 deletions tests/drivers/dma/loop_transfer/testcase.yaml
Expand Up @@ -4,4 +4,7 @@ tests:
tags:
- drivers
- dma
integration_platforms:
- native_posix
- native_posix_64
filter: dt_nodelabel_enabled("test_dma0")
1 change: 1 addition & 0 deletions tests/drivers/dma/scatter_gather/boards/native_posix.conf
@@ -0,0 +1 @@
CONFIG_DMA_EMUL=y
13 changes: 13 additions & 0 deletions tests/drivers/dma/scatter_gather/boards/native_posix.overlay
@@ -0,0 +1,13 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
dma-requests = <4>;
status = "okay";
};

test_dma0: &dma { };
2 changes: 2 additions & 0 deletions tests/drivers/dma/scatter_gather/boards/native_posix_64.conf
@@ -0,0 +1,2 @@
CONFIG_DMA_EMUL=y
CONFIG_DMA_64BIT=y
13 changes: 13 additions & 0 deletions tests/drivers/dma/scatter_gather/boards/native_posix_64.overlay
@@ -0,0 +1,13 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

&dma {
dma-channels = <2>;
dma-requests = <4>;
status = "okay";
};

test_dma0: &dma { };
4 changes: 4 additions & 0 deletions tests/drivers/dma/scatter_gather/testcase.yaml
Expand Up @@ -9,6 +9,10 @@ tests:
- frdm_k64f
- mimxrt1060_evk
- lpcxpresso55s36
- native_posix
- native_posix_64
filter: dt_alias_exists("dma0")
integration_platforms:
- intel_adsp_cavs25
- native_posix
- native_posix_64

0 comments on commit ad012d3

Please sign in to comment.