add self test code for DMA engine drivers
Subsystems (3)
v5 cover add self test code for DMA engine drivers
Changes from V4 (https://lkml.org/lkml/2015/11/12/18)
* Seperate the series from HIDMA driver
Sinan Kaya (2):
dmaselftest: add memcpy selftest support functions
dma: qcom_hidma: add self test hooks
drivers/dma/dmaengine.h | 2 + drivers/dma/dmaselftest.c | 638 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/dma/qcom/Makefile | 2 +- drivers/dma/qcom/hidma.c | 4 + 4 files changed, 645 insertions(+), 1 deletion(-) create mode 100644 drivers/dma/dmaselftest.c
Signature · 2 lines
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v5 1/2 dmaselftest: add memcpy selftest support functions
This patch adds supporting utility functions for selftest. The intention is to share the self test code between different drivers.
Supported test cases include:
1. dma_map_single
2. streaming DMA
3. coherent DMA
4. scatter-gather DMA
Signed-off-by Sinan Kaya <[email protected]>
--- drivers/dma/dmaengine.h | 2 + drivers/dma/dmaselftest.c | 638 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 640 insertions(+) create mode 100644 drivers/dma/dmaselftest.c
drivers/dma/dmaengine.h +2 -0
@@ -86,4 +86,6 @@ static inline void dma_set_residue(struct dma_tx_state *state, u32 residue) state->residue = residue; } +int dma_selftest_memcpy (struct dma_device *dmadev); +#endif
drivers/dma/dmaselftest.c new file +638 -0
638 lines not on this page · raw message
Signature · 2 lines
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v5 2/2 dma: qcom_hidma: add self test hooks
In reply to Sinan KayaAdd hooks for the self test code into the probe routine.
Signed-off-by Sinan Kaya <[email protected]>
--- drivers/dma/qcom/Makefile | 2 +- drivers/dma/qcom/hidma.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/dma/qcom/Makefile +1 -1
@@ -1,4 +1,4 @@ obj-$(CONFIG_QCOM_BAM_DMA) += bam_dma.o obj-$(CONFIG_QCOM_HIDMA_MGMT) += hidma_mgmt.o hidma_mgmt_sys.o obj-$(CONFIG_QCOM_HIDMA) += hdma.o -hdma-objs := hidma_ll.o hidma.o hidma_dbg.o +hdma-objs := hidma_ll.o hidma.o hidma_dbg.o ../dmaselftest.o
drivers/dma/qcom/hidma.c +4 -0
@@ -649,6 +649,10 @@ static int hidma_probe(struct platform_device *pdev)if (rc) goto uninit; + rc =dma_selftest_memcpy (&dmadev->ddev); +if (rc) + goto uninit; + rc =dma_async_device_register (&dmadev->ddev);if (rc) goto uninit;
Signature · 2 lines
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project