dmaengine: dw: Register ACPI DMA controller for PCI that has companion
Subsystems (2)
Andy Shevchenko
reviewerPATCH 1/2 dmaengine: dw: Register ACPI DMA controller for PCI that has companion
If PCI enumerated controller has a companion device, register it in the ACPI DMA controllers as well.
Fixes f7c799e950f9 ("dmaengine: dw: we do support Merrifield SoC in PCI mode")
Depends-on: b685fe26e9af ("dmaengine: dw: platform: Split ACPI helpers to separate module")
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/dma/dw/Makefile | 2 +- drivers/dma/dw/acpi.c | 2 ++ drivers/dma/dw/pci.c | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-)
drivers/dma/dw/Makefile +1 -1
@@ -1,10 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DW_DMAC_CORE) += dw_dmac_core.o dw_dmac_core-objs := core.o dw.o idma32.o +dw_dmac_core-$(CONFIG_ACPI) += acpi.o obj-$(CONFIG_DW_DMAC) += dw_dmac.o dw_dmac-y := platform.o -dw_dmac-$(CONFIG_ACPI) += acpi.o dw_dmac-$(CONFIG_OF) += of.o obj-$(CONFIG_DW_DMAC_PCI) += dw_dmac_pci.o
drivers/dma/dw/acpi.c +2 -0
@@ -41,6 +41,7 @@ void dw_dma_acpi_controller_register(struct dw_dma *dw)if (ret)dev_err (dev,"could not register acpi_dma_controller\n" ); } +EXPORT_SYMBOL_GPL (dw_dma_acpi_controller_register);void dw_dma_acpi_controller_free (struct dw_dma *dw) {
@@ -51,3 +52,4 @@ void dw_dma_acpi_controller_free(struct dw_dma *dw)acpi_dma_controller_free (dev); } +EXPORT_SYMBOL_GPL (dw_dma_acpi_controller_free);
drivers/dma/dw/pci.c +4 -0
@@ -60,6 +60,8 @@ static int dw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid)if (ret)return ret; +dw_dma_acpi_controller_register (chip->dw); +pci_set_drvdata (pdev, data);return 0 ;
@@ -71,6 +73,8 @@ static void dw_pci_remove(struct pci_dev *pdev)struct dw_dma_chip *chip = data->chip;int ret; +dw_dma_acpi_controller_free (chip->dw); + ret = data->remove (chip);if (ret)dev_warn (&pdev->dev,"can't remove device properly: %d\n" , ret);
Signature · 1 line
2.26.2
Andy Shevchenko
reviewerPATCH 2/2 dmaengine: dw: Replace 'objs' by 'y'
-objs is fitted for building host programs, change to -y, more straightforward for device drivers.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/dma/dw/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/dw/Makefile +2 -2
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DW_DMAC_CORE) += dw_dmac_core.o -dw_dmac_core-objs := core.o dw.o idma32.o +dw_dmac_core-y := core.o dw.o idma32.o dw_dmac_core-$(CONFIG_ACPI) += acpi.o obj-$(CONFIG_DW_DMAC) += dw_dmac.o
@@ -8,4 +8,4 @@ dw_dmac-y := platform.o dw_dmac-$(CONFIG_OF) += of.o obj-$(CONFIG_DW_DMAC_PCI) += dw_dmac_pci.o -dw_dmac_pci-objs := pci.o +dw_dmac_pci-y := pci.o
Signature · 1 line
2.26.2
Quoted 2 lines · Andy Shevchenko
If PCI enumerated controller has a companion device, register it in the ACPI DMA controllers as well.
Applied both, thanks
Signature · 1 line
~Vinod