summaryrefslogtreecommitdiffstats
path: root/drivers/dma/ptdma
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'dmaengine-fix-5.17' into nextVinod Koul2022-03-101-8/+9
|\ | | | | | | | | This merges dmaengine/dmaengine-fix-5.17 tag into next as that is already merged mainline and resolves depencency in patches
| * dmaengine: ptdma: Fix the error handling path in pt_core_init()Christophe JAILLET2022-02-151-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to free resources correctly in the error handling path of pt_core_init(), 2 goto's have to be switched. Otherwise, some resources will leak and we will try to release things that have not been allocated yet. Also move a dev_err() to a place where it is more meaningful. Fixes: fa5d823b16a9 ("dmaengine: ptdma: Initial driver for the AMD PTDMA") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Sanjay R Mehta <sanju.mehta@amd.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/41a963a35173f89c874f5c44df5530dc09fea8da.1644044244.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul <vkoul@kernel.org>
* | dmaengine: ptdma: handle the cases based on DMA is completeSanjay R Mehta2022-02-151-6/+11
| | | | | | | | | | | | | | | | | | | | There is a need to segregate the cases when DMA is complete or not. In case if DMA is already complete there is no need to handle it again and gracefully exit from the function. Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Link: https://lore.kernel.org/r/1643814880-3882-3-git-send-email-Sanju.Mehta@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* | dmaengine: ptdma: fix concurrency issue with multiple dma transferSanjay R Mehta2022-02-151-1/+6
|/ | | | | | | | | | The command should be submitted only if the engine is idle, for this, the next available descriptor is checked and set the flag to false in case the descriptor is non-empty. Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Link: https://lore.kernel.org/r/1643814880-3882-2-git-send-email-Sanju.Mehta@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* dmaengine: ptdma: remove PT_OFFSET to avoid redefnitionSanjay R Mehta2021-08-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Building on ARCH=um causes a "redefined" warning, so remove this PT_OFFSET macro to avoid the warning. drivers/dma/ptdma/ptdma.h:34: warning: "PT_OFFSET" redefined 34 | #define PT_OFFSET 0x0 | In file included from ./arch/um/include/asm/thread_info.h:17, from ./include/linux/thread_info.h:60, from ./include/asm-generic/preempt.h:5, from ./arch/um/include/generated/asm/preempt.h:1, from ./include/linux/preempt.h:78, from ./include/linux/spinlock.h:55, from ./include/linux/wait.h:9, from ./include/linux/wait_bit.h:8, from ./include/linux/fs.h:6, from ./include/linux/debugfs.h:15, from drivers/dma/ptdma/ptdma-debugfs.c:12: ./arch/x86/um/shared/sysdep/ptrace_user.h:4: note: this is the location of the previous definition 4 | #define PT_OFFSET(r) ((r) * sizeof(long)) Reported-by: kernel test robot <lkp@intel.com> Fixes: 2a99524459ce ("dmaengine: ptdma: Initial driver for the AMD PTDMA") Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Link: https://lore.kernel.org/r/1630178908-54973-1-git-send-email-Sanju.Mehta@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* dmaengine: ptdma: Add debugfs entries for PTDMASanjay R Mehta2021-08-294-1/+118
| | | | | | | | | | Expose data about the configuration and operation of the PTDMA through debugfs entries: device name, capabilities, configuration, statistics. Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Link: https://lore.kernel.org/r/1629208559-51964-4-git-send-email-Sanju.Mehta@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* dmaengine: ptdma: register PTDMA controller as a DMA resourceSanjay R Mehta2021-08-295-1/+450
| | | | | | | | | Register ptdma queue to Linux dmaengine framework as general-purpose DMA channels. Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Link: https://lore.kernel.org/r/1629208559-51964-3-git-send-email-Sanju.Mehta@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* dmaengine: ptdma: Initial driver for the AMD PTDMASanjay R Mehta2021-08-295-0/+825
Add support for AMD PTDMA controller. It performs high-bandwidth memory to memory and IO copy operation. Device commands are managed via a circular queue of 'descriptors', each of which specifies source and destination addresses for copying a single buffer of data. Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Link: https://lore.kernel.org/r/1629208559-51964-2-git-send-email-Sanju.Mehta@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>