Re: [PATCH v12 2/2] dmaengine: dw-edma: Add non-LL mode

From: Frank Li

Date: Tue Mar 10 2026 - 15:47:41 EST


On Tue, Mar 10, 2026 at 06:00:55PM +0530, Devendra K Verma wrote:
> AMD MDB IP supports Linked List (LL) mode as well as non-LL mode.
> The current code does not have the mechanisms to enable the
> DMA transactions using the non-LL mode. The following two cases
> are added with this patch:
> - For the AMD (Xilinx) only, when a valid physical base address of
> the device side DDR is not configured, then the IP can still be
> used in non-LL mode. For all the channels DMA transactions will
> be using the non-LL mode only. This, the default non-LL mode,
> is not applicable for Synopsys IP with the current code addition.
>
> - If the default mode is LL-mode, for both AMD (Xilinx) and Synosys,
> and if user wants to use non-LL mode then user can do so via
> configuring the peripheral_config param of dma_slave_config.
>
> Signed-off-by: Devendra K Verma <devendra.verma@xxxxxxx>
> ---
...
> diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
> index b8208186a250..f538d728609f 100644
> --- a/drivers/dma/dw-edma/dw-edma-pcie.c
> +++ b/drivers/dma/dw-edma/dw-edma-pcie.c
> @@ -295,6 +295,15 @@ static void dw_edma_pcie_get_xilinx_dma_data(struct pci_dev *pdev,
> pdata->devmem_phys_off = off;
> }
>
> +static u64 dw_edma_get_phys_addr(struct pci_dev *pdev,
> + struct dw_edma_pcie_data *pdata,
> + enum pci_barno bar)
> +{
> + if (pdev->vendor == PCI_VENDOR_ID_XILINX)
> + return pdata->devmem_phys_off;
> + return pci_bus_address(pdev, bar);
> +}
> +

You missed my previous review feedback about create new patch for code
restructure. But change related small.

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>

>
> - for (i = 0; i < chip->ll_wr_cnt; i++) {
> + for (i = 0; i < chip->ll_wr_cnt && !non_ll; i++) {
> struct dw_edma_region *ll_region = &chip->ll_region_wr[i];
> struct dw_edma_region *dt_region = &chip->dt_region_wr[i];
> struct dw_edma_block *ll_block = &vsec_data->ll_wr[i];
> @@ -410,7 +424,8 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
> return -ENOMEM;
>
> ll_region->vaddr.io += ll_block->off;
> - ll_region->paddr = pci_bus_address(pdev, ll_block->bar);
> + ll_region->paddr = dw_edma_get_phys_addr(pdev, vsec_data,
> + ll_block->bar);
>