Commit Graph

113 Commits

Author SHA1 Message Date
Hake Huang
6dbd89bae7 test: dma: sg fixing source address alignment issue
in NXP platform, src address shall be 4 bytes alligned
adding this restricting to test cases

fixing: #48512

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-08-03 11:20:10 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
TOKITA Hiroshi
d5ab3ee0b0 tests: dma: loop_transfer: Add GD32 series to loop_transfer test
Add configuration file for GD32 boards.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-08-02 09:13:21 +02:00
Kumar Gala
9e7255adda tests: dma: scatter_gather: Add mimxrt1060_evk to test platforms
Add overlay that enables mimxrt1060_evk on test.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 11:36:08 -05:00
Kumar Gala
37fded7d37 tests: dma: Add FRDM-K64F to test platforms
Add overlays that enables FRDM-K64F for several dma tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 11:36:08 -05:00
Kumar Gala
0f8dbcbb39 tests: dma: scatter_gather: Add filter to limit platforms
Add testcase filter based on devicetree alias "dma0" being set.  This
is needed since the testcase requires it to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 11:36:08 -05:00
Kumar Gala
1f2f925f93 tests: dma: chan_blen_transfer: Add filter to limit platforms
Add testcase filter based on devicetree nodelabel test_dma being set.
This is needed since the testcase requires it to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 11:36:08 -05:00
Kumar Gala
0100dc5e3c tests: dma: loop_transfer: Add filter to limit platforms
Add testcase filter based on devicetree nodelabel test_dma being set.
This is needed since the testcase requires it to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 11:36:08 -05:00
Hake Huang
54094809d6 tests: dma: upgrade dma test to new ztest api
1. config ztest_new_api and update the testcase defines

2. remove shell interactive test cases, twister has another plan

3. add sg case support for kinetis and rt10xx platfrom

related: #47002

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-07-29 09:31:34 -05:00
Kumar Gala
bc8dfda15f tests: dma: chan_blen_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>
2022-07-27 09:47:59 +02:00
Kumar Gala
b1a8246b56 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>
2022-07-27 09:47:59 +02:00
Kumar Gala
bf66f92eb5 tests: dma: scatter_gather: Convert to DEVICE_DT_GET
Convert test to use DEVICE_DT_GET via a nodelabel.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-27 09:47:59 +02:00
Kumar Gala
7ff1501320 tests: dma: chan_link_transfer: Convert to DEVICE_DT_GET
Convert test to use DEVICE_DT_GET via a nodelabel.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-27 09:47:59 +02:00
Anas Nashif
02f2896586 tests: add mising braces to single line if statements
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 11:00:45 -04:00
Gerard Marull-Paretas
ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Katarzyna Giadla
681e3a16c7 tests: Change duplicated names of the test cases
Some names of the test cases are duplicated within the project.
This commit contains the proposed names of the test scenarios.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-03-30 17:42:01 -04:00
Tom Burdick
2f792c2de5 dma/dw_common: Update dma_dw_common from sof
Ports the SOF DesignWare DMA code to Zephyr.

Effectively replaces much of what was the designware driver as this
driver enables scatter gather which the older driver did not.

* Enables cyclic transfer description lists when the cyclic config
  param is given.
* Enables linear link position usage with cAVS GPDMA.
* Passes suspend/resume, scatter/gather tests.
* Provides status updates of the transfer through dma_get_status()
* Enables reloading a cyclic transfer with dma_reload()
* Enables dma handshakes using the dma_slot config param.
* cAVS specifics remain in the dma_cavs_gpdma driver.

Co-authored-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Co-authored-by: Tom Burdick <thomas.burdick@intel.com>
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-03-29 14:33:48 -04:00
Tom Burdick
2ec3222426 dma: Scatter gather test
Adds a scatter gather test against memory to memory transfers. Initially
excludes all platforms as they are all failing.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-03-28 12:46:41 +02:00
Tom Burdick
f8250c9813 dma: Better suspend/resume testing
Make the test data larger to help slow down the transfer long enough
to get suspend to work. Then attempt to spin on suspend. Suspending any
of the test transfers is a success.

Previous suspend resume test would always fail on DesignWare DMA
as it was seemingly already done by the time dma_suspend would be
called in the ISR.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-03-24 10:44:50 +01:00
Hake Huang
3b576fc688 tests: dma: fix loopback suspend and resume issue
update dma loop test to resolve call sequence issue,
and avoid randum failure due to
dma finished fast than the dma status check. which cause suspend fails.

fixing #43739

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-03-18 12:14:05 -04:00
Tomasz Bursztyka
c94b341a54 tests: constify all device instances
Run cocci script to constify device instances.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2022-03-16 12:33:12 +01:00
Francois Ramu
d91bdc0f51 tests: drivers: dma test running on the nucleo_wl55 board
enable the dma and dmamux to the nucleo_wl55jc
so that dma testcases can run on that target

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-04 09:11:38 -06:00
Tom Burdick
0e96f59e83 dma: Add suspend resume implementation for edma
Implement the suspend and resume transfer api calls for NXP's eDMA.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-01-12 17:33:48 -05:00
Daniel DeGrasse
ba462bbb74 boards: mimxrt1070_evk_cm7: Enable DMA controller on RT1170 EVK
DMA controller is enabled and tested for cortex M7 core. The M7 core was
tested on the loop and channel link transfer tests.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-08 08:40:06 -05:00
Daniel DeGrasse
4d4939c4e1 boards: mimxrt1060_evk_cm7: Enable DMA controller on RT1160 EVK
DMA controller is enabled and tested for cortex M7 core. The M7 core was
tested on the loop and channel link transfer tests.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-08 08:40:06 -05:00
Maureen Helm
4aec077d17 tests: drivers: Extend dma channel link test to mimxrt1064_evk board
Adds mimxrt1064_evk to the list of allowed platforms for the dma channel
link test.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-08-24 22:15:19 -04:00
Torsten Rasmussen
1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Francois Ramu
c47d573175 tests: drivers: dma testing on the stm32f103 nucleo board
This adds the configuration to pass the testcases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f103rb board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu
fba2d6de39 tests: drivers: dma testing on the stm32f207 nucleo board
This adds the configuration to pass tes testcases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f207zg board.
The DMA2 instance supports mem2mem transfers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu
a5cca19386 tests: drivers: dma testing on the stm32f429 nucleo board
This adds the configuration and set the DTS to pass
the dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f429zi board.
The DMA2 instance supports mem2mem transfers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu
9ecf810832 tests: drivers: dma testing on the stm32l152 nucleo board
This adds the configuration to pass testcases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_l152re board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu
772c9c5cee tests: drivers: dma testing on the stm32f091 nucleo board
This adds the configuration to pass testscases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f091rc board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Krishna Mohan Dani
71026462d8 tests/drivers: dma: sets DMA config in chan_blen_transfer on stm32f3_disco
This commit sets the below configuration when
tests/drivers/dma/chan_blen_transfer is executed on stm32f3_disco
platform.

CONFIG_DMA_TRANSFER_DRV_NAME="DMA_1"
CONFIG_DMA_TRANSFER_CHANNEL_NR_0=4
CONFIG_DMA_TRANSFER_CHANNEL_NR_1=2

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-29 11:01:40 -04:00
Krishna Mohan Dani
a63bee82fd tests/drivers: dma: sets DMA config in loop_transfer on stm32f3_disco
This commit sets the below configuration when
tests/drivers/dma/loop_transfer is executed on stm32f3_disco
platform.

CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-29 11:01:40 -04:00
Krishna Mohan Dani
cf39aec86a tests/drivers: nucleo_l552ze_q: Configures DMA to run loop_transfer test
This commit configures DMA to run tests/drivers/dma/loop_transfer
test on nucleo_l552ze_q platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Krishna Mohan Dani
299d432860 tests/drivers: nucleo_l552ze_q: Configures DMA for chan_blen_transfer test
This commit configures the DMA to run
tests/drivers/dma/chan_blen_transfer test on nucleo_l552ze_q platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Krishna Mohan Dani
2194b79804 tests/drivers: stm32l562e_dk: Configures DMA to run loop_transfer test.
This commit configures the required DMA parameters to run
tests/drivers/dma/loop_transfer test on stm32l562e_dk platform.
This has been tested and is working as expected.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Krishna Mohan Dani
b59aad567c tests/drivers: stm32l562e_dk: Configures DMA for chan_blen_transfer test
This commit configures the required DMA parameters to run
tests/drivers/dma/chan_blen_transfer test on stm32l562e_dk platform.
This has been tested and is working as expected.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Hake Huang
f6c338d600 test: dma: assign correct LPC dma engine channel for test
LPC dma channel 32/31 is for memory to memory.

Fixing: #34909

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-25 09:57:21 -05:00
Simon Guinot
54d3f136ec tests: drivers: dma: enable tests on nucleo_f070rb
This patch enables the DMA chan_blen_transfer and loop_transfer tests on
the nucleo_f070rb board.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-05-20 13:24:18 -05:00
Thomas Stranger
a3967cefa4 tests: dma: add nucleog474re board
Add nucleo_g474re board to dma/chan_blen_transfer and dma/loop_transfer
tests.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-05-06 09:28:33 -05:00
Francois Ramu
cb1ac9e925 tests: drivers: dma set correct type for the chan_id
The chan_id value returned by dma_request_channel
can be negative, changing the type of chan_id to int.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-05-04 10:12:11 -05:00
Thomas Stranger
2cf23469e5 tests: driver: dma: enable tests on stm32g0 boards
Enables dma test cases loop_transfer and chan_blen_transfer
on stm32g03116_disco, nucleo_g071rb and nucleo_g0b1re.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-04-26 14:16:03 -04:00
Hake Huang
b609242903 dma: add request channel and release channel helper
add two dma api for dynamic channel reqest and release

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-04-23 14:58:40 +02:00
Shlomi Vaknin
703d396956 tests: dma: add stm32h7 to loop_transfer
Add nucleo h743zi board to loop_transfer test.

Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
2021-04-14 18:18:12 +02:00
Shlomi Vaknin
cb1b231766 tests: dma: add stm32h7 to chan_blen_transfer
Add nucleo h743zi board to chan_blen_transfer test.

Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
2021-04-14 18:18:12 +02:00
Maureen Helm
5649ea6ccd tests: drivers: Fix dma channel link test
The Kconfig symbol CONFIG_DMA_0_NAME was recently removed. Update the
dma channel link transfer test to get the device name from an
application level Kconfig instead, similar to other dma driver tests.

This fixes a CI compliance failure that checks for references to
undefined Kconfig symbols.

Tested on the mimxrt1050_evk board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-04-08 14:52:07 -04:00
Hake Huang
930893fc56 tests: add mcux edma channel link test
test minor/major link mode on frdm_k64f and mimxrt1060_evk

log as below:

Running test suite dma_m2m_link_test
===================================================================
START - test_dma_m2m_chan0_1_major_link
Preparing DMA Controller: Chan_ID=1, BURST_LEN=1
Starting the transfer
DMA transfer done ch 0
It is harder to be kind than to be wise........
It is harder to
 PASS - test_dma_m2m_chan0_1_major_link
===================================================================
START - test_dma_m2m_chan0_1_minor_link
Preparing DMA Controller: Chan_ID=1, BURST_LEN=1
Starting the transfer
DMA transfer done ch 0
It is harder to be kind than to be wise........
It is harder to be kind than to
 PASS - test_dma_m2m_chan0_1_minor_link
===================================================================
START - test_dma_m2m_chan0_1_minor_major_link
Preparing DMA Controller: Chan_ID=1, BURST_LEN=1
Starting the transfer
DMA transfer done ch 0
DMA transfer done ch 1
It is harder to be kind than to be wise........
It is harder to be kind than to be wise........
 PASS - test_dma_m2m_chan0_1_minor_major_link
===================================================================
Test suite dma_m2m_link_test succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-04-08 16:38:49 +02:00
Henrik Brix Andersen
711347686e tests: drivers: dma: add twr_ke18f board configurations
Add NXP TWR-KE18F development board test configurations for the DMA
driver test suites.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-03-31 09:22:10 -05:00
Francois Ramu
7664171518 tests: drivers: dma: remove dead code in test_dma_loop.c
Fix the error of the [Coverity CID :219489] "Structurally
dead code in tests/drivers/dma/loop_transfer/src/test_dma_loop.c"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-03-10 05:41:20 -05:00