2020-03-24 11:31:33

by Laurentiu Tudor

[permalink] [raw]
Subject: [RFC PATCH v2 0/4] bus: fsl-mc: Add ACPI support for fsl-mc

From: Laurentiu Tudor <[email protected]>

This patch adds ACPI support for the fsl-mc bus driver. First 2 patches
are prerequsite that remove dependencies on device tree. Third patch
adds the actual ACPI support and the final one drops some fsl-mc
specific code in the generic device tree handling code.

Changes in v2:
- add missing of_xlate call in custom .dma_configure (patch 1)
- added a cover letter

Diana Craciun (1):
irqchip/fsl-mc: Change the way the IRQ domain is set for MC devices

Laurentiu Tudor (2):
bus: fsl-mc: add custom .dma_configure implementation
iommu/of: get rid of fsl-mc specific code

Makarand Pawagi (1):
bus: fsl-mc: Add ACPI support for fsl-mc

drivers/bus/fsl-mc/fsl-mc-bus.c | 85 ++++++++++++++++-----
drivers/bus/fsl-mc/fsl-mc-msi.c | 11 ++-
drivers/iommu/of_iommu.c | 20 -----
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 69 ++++++++++++++++-
4 files changed, 145 insertions(+), 40 deletions(-)

--
2.17.1


2020-03-24 11:31:42

by Laurentiu Tudor

[permalink] [raw]
Subject: [RFC PATCH v2 4/4] iommu/of: get rid of fsl-mc specific code

From: Laurentiu Tudor <[email protected]>

Changing the way we configure dma for fsl-mc devices allows
us to get rid of our fsl-mc specific code in the generic
of iommu code.

Signed-off-by: Laurentiu Tudor <[email protected]>
---
drivers/iommu/of_iommu.c | 20 --------------------
1 file changed, 20 deletions(-)

diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index 20738aacac89..332072ada474 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -15,7 +15,6 @@
#include <linux/of_pci.h>
#include <linux/pci.h>
#include <linux/slab.h>
-#include <linux/fsl/mc.h>

#define NO_IOMMU 1

@@ -139,23 +138,6 @@ static int of_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
return err;
}

-static int of_fsl_mc_iommu_init(struct fsl_mc_device *mc_dev,
- struct device_node *master_np)
-{
- struct of_phandle_args iommu_spec = { .args_count = 1 };
- int err;
-
- err = of_map_rid(master_np, mc_dev->icid, "iommu-map",
- "iommu-map-mask", &iommu_spec.np,
- iommu_spec.args);
- if (err)
- return err == -ENODEV ? NO_IOMMU : err;
-
- err = of_iommu_xlate(&mc_dev->dev, &iommu_spec);
- of_node_put(iommu_spec.np);
- return err;
-}
-
const struct iommu_ops *of_iommu_configure(struct device *dev,
struct device_node *master_np)
{
@@ -188,8 +170,6 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
pci_request_acs();
err = pci_for_each_dma_alias(to_pci_dev(dev),
of_pci_iommu_init, &info);
- } else if (dev_is_fsl_mc(dev)) {
- err = of_fsl_mc_iommu_init(to_fsl_mc_device(dev), master_np);
} else {
struct of_phandle_args iommu_spec;
int idx = 0;
--
2.17.1