diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-24 00:05:10 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-24 00:05:10 +0100 |
commit | 143983e585073f18fbe3b7d30ed0f92cfc218cef (patch) | |
tree | fea85dadf9e57e685769870bd2036a41695fbc4c /drivers/dma/imx-sdma.c | |
parent | Merge tag 'acpi-5.12-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
parent | dmaengine: dw-axi-dmac: remove redundant null check on desc (diff) | |
download | linux-143983e585073f18fbe3b7d30ed0f92cfc218cef.tar.xz linux-143983e585073f18fbe3b7d30ed0f92cfc218cef.zip |
Merge tag 'dmaengine-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine
Pull dmaengine updates from Vinod Koul:
"We have couple of drivers removed a new driver and bunch of new device
support and few updates to drivers for this round.
New drivers/devices:
- Intel LGM SoC DMA driver
- Actions Semi S500 DMA controller
- Renesas r8a779a0 dma controller
- Ingenic JZ4760(B) dma controller
- Intel KeemBay AxiDMA controller
Removed:
- Coh901318 dma driver
- Zte zx dma driver
- Sirfsoc dma driver
Updates:
- mmp_pdma, mmp_tdma gained module support
- imx-sdma become modern and dropped platform data support
- dw-axi driver gained slave and cyclic dma support"
* tag 'dmaengine-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (58 commits)
dmaengine: dw-axi-dmac: remove redundant null check on desc
dmaengine: xilinx_dma: Alloc tx descriptors GFP_NOWAIT
dmaengine: dw-axi-dmac: Virtually split the linked-list
dmaengine: dw-axi-dmac: Set constraint to the Max segment size
dmaengine: dw-axi-dmac: Add Intel KeemBay AxiDMA BYTE and HALFWORD registers
dmaengine: dw-axi-dmac: Add Intel KeemBay AxiDMA handshake
dmaengine: dw-axi-dmac: Add Intel KeemBay AxiDMA support
dmaengine: drivers: Kconfig: add HAS_IOMEM dependency to DW_AXI_DMAC
dmaengine: dw-axi-dmac: Add Intel KeemBay DMA register fields
dt-binding: dma: dw-axi-dmac: Add support for Intel KeemBay AxiDMA
dmaengine: dw-axi-dmac: Support burst residue granularity
dmaengine: dw-axi-dmac: Support of_dma_controller_register()
dmaegine: dw-axi-dmac: Support device_prep_dma_cyclic()
dmaengine: dw-axi-dmac: Support device_prep_slave_sg
dmaengine: dw-axi-dmac: Add device_config operation
dmaengine: dw-axi-dmac: Add device_synchronize() callback
dmaengine: dw-axi-dmac: move dma_pool_create() to alloc_chan_resources()
dmaengine: dw-axi-dmac: simplify descriptor management
dt-bindings: dma: Add YAML schemas for dw-axi-dmac
dmaengine: ti: k3-psil: optimize struct psil_endpoint_config for size
...
Diffstat (limited to 'drivers/dma/imx-sdma.c')
-rw-r--r-- | drivers/dma/imx-sdma.c | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 41ba21eea7c8..d5590c08db51 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1952,8 +1952,6 @@ static struct dma_chan *sdma_xlate(struct of_phandle_args *dma_spec, static int sdma_probe(struct platform_device *pdev) { - const struct of_device_id *of_id = - of_match_device(sdma_dt_ids, &pdev->dev); struct device_node *np = pdev->dev.of_node; struct device_node *spba_bus; const char *fw_name; @@ -1961,17 +1959,9 @@ static int sdma_probe(struct platform_device *pdev) int irq; struct resource *iores; struct resource spba_res; - struct sdma_platform_data *pdata = dev_get_platdata(&pdev->dev); int i; struct sdma_engine *sdma; s32 *saddr_arr; - const struct sdma_driver_data *drvdata = NULL; - - drvdata = of_id->data; - if (!drvdata) { - dev_err(&pdev->dev, "unable to find driver data\n"); - return -EINVAL; - } ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) @@ -1984,7 +1974,7 @@ static int sdma_probe(struct platform_device *pdev) spin_lock_init(&sdma->channel_0_lock); sdma->dev = &pdev->dev; - sdma->drvdata = drvdata; + sdma->drvdata = of_device_get_match_data(sdma->dev); irq = platform_get_irq(pdev, 0); if (irq < 0) @@ -2063,8 +2053,6 @@ static int sdma_probe(struct platform_device *pdev) if (sdma->drvdata->script_addrs) sdma_add_scripts(sdma, sdma->drvdata->script_addrs); - if (pdata && pdata->script_addrs) - sdma_add_scripts(sdma, pdata->script_addrs); sdma->dma_device.dev = &pdev->dev; @@ -2110,30 +2098,18 @@ static int sdma_probe(struct platform_device *pdev) } /* - * Kick off firmware loading as the very last step: - * attempt to load firmware only if we're not on the error path, because - * the firmware callback requires a fully functional and allocated sdma - * instance. + * Because that device tree does not encode ROM script address, + * the RAM script in firmware is mandatory for device tree + * probe, otherwise it fails. */ - if (pdata) { - ret = sdma_get_firmware(sdma, pdata->fw_name); - if (ret) - dev_warn(&pdev->dev, "failed to get firmware from platform data\n"); + ret = of_property_read_string(np, "fsl,sdma-ram-script-name", + &fw_name); + if (ret) { + dev_warn(&pdev->dev, "failed to get firmware name\n"); } else { - /* - * Because that device tree does not encode ROM script address, - * the RAM script in firmware is mandatory for device tree - * probe, otherwise it fails. - */ - ret = of_property_read_string(np, "fsl,sdma-ram-script-name", - &fw_name); - if (ret) { - dev_warn(&pdev->dev, "failed to get firmware name\n"); - } else { - ret = sdma_get_firmware(sdma, fw_name); - if (ret) - dev_warn(&pdev->dev, "failed to get firmware from device tree\n"); - } + ret = sdma_get_firmware(sdma, fw_name); + if (ret) + dev_warn(&pdev->dev, "failed to get firmware from device tree\n"); } return 0; |