All of lore.kernel.org
 help / color / mirror / Atom feed
From: laurentiu.tudor@nxp.com
To: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org
Cc: robin.murphy@arm.com, lorenzo.pieralisi@arm.com,
	ard.biesheuvel@linaro.org, ioana.ciornei@nxp.com,
	diana.craciun@oss.nxp.com, maz@kernel.org, jon@solid-run.com,
	pankaj.bansal@nxp.com, makarand.pawagi@nxp.com,
	calvin.johnson@nxp.com, V.Sethi@nxp.com,
	cristian.sovaiala@nxp.com, Stuart.Yoder@arm.com,
	jeremy.linton@arm.com, joro@8bytes.org, tglx@linutronix.de,
	jason@lakedaemon.net
Subject: [RFC PATCH 2/4] irqchip/fsl-mc: Change the way the IRQ domain is set for MC devices
Date: Thu, 27 Feb 2020 12:05:40 +0200	[thread overview]
Message-ID: <20200227100542.13819-2-laurentiu.tudor@nxp.com> (raw)
In-Reply-To: <20200227100542.13819-1-laurentiu.tudor@nxp.com>

From: Diana Craciun <diana.craciun@oss.nxp.com>

In ACPI the MC bus is represented as a platform device and a named
component in the IORT table. The mc-bus devices are discovered
dynamically at runtime but they share the same fwnode with the parent
platfom device. This patch changes the way the IRQ domain is searched
for the MC devices: it takes the fwnode reference from the parent and
uses the fwnode reference to find the MC IRQ domain.

Signed-off-by: Diana Craciun <diana.craciun@oss.nxp.com>
---
 drivers/bus/fsl-mc/fsl-mc-msi.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-msi.c
index 8b9c66d7c4ff..1e2e97329781 100644
--- a/drivers/bus/fsl-mc/fsl-mc-msi.c
+++ b/drivers/bus/fsl-mc/fsl-mc-msi.c
@@ -182,16 +182,23 @@ int fsl_mc_find_msi_domain(struct device *mc_platform_dev,
 {
 	struct irq_domain *msi_domain;
 	struct device_node *mc_of_node = mc_platform_dev->of_node;
+	struct fwnode_handle *fwnode;
 
-	msi_domain = of_msi_get_domain(mc_platform_dev, mc_of_node,
-				       DOMAIN_BUS_FSL_MC_MSI);
+	msi_domain = dev_get_msi_domain(mc_platform_dev);
 	if (!msi_domain) {
 		pr_err("Unable to find fsl-mc MSI domain for %pOF\n",
 		       mc_of_node);
 
 		return -ENOENT;
 	}
+	fwnode = msi_domain->fwnode;
+	msi_domain = irq_find_matching_fwnode(fwnode, DOMAIN_BUS_FSL_MC_MSI);
+	if (!msi_domain) {
+		pr_err("Unable to find fsl-mc MSI domain for %pOF\n",
+		       mc_of_node);
 
+		return -ENOENT;
+	}
 	*mc_msi_domain = msi_domain;
 	return 0;
 }
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: laurentiu.tudor@nxp.com
To: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org
Cc: calvin.johnson@nxp.com, ard.biesheuvel@linaro.org,
	maz@kernel.org, pankaj.bansal@nxp.com, diana.craciun@oss.nxp.com,
	jon@solid-run.com, jeremy.linton@arm.com,
	makarand.pawagi@nxp.com, cristian.sovaiala@nxp.com,
	V.Sethi@nxp.com, ioana.ciornei@nxp.com, tglx@linutronix.de,
	robin.murphy@arm.com, jason@lakedaemon.net, Stuart.Yoder@arm.com
Subject: [RFC PATCH 2/4] irqchip/fsl-mc: Change the way the IRQ domain is set for MC devices
Date: Thu, 27 Feb 2020 12:05:40 +0200	[thread overview]
Message-ID: <20200227100542.13819-2-laurentiu.tudor@nxp.com> (raw)
In-Reply-To: <20200227100542.13819-1-laurentiu.tudor@nxp.com>

From: Diana Craciun <diana.craciun@oss.nxp.com>

In ACPI the MC bus is represented as a platform device and a named
component in the IORT table. The mc-bus devices are discovered
dynamically at runtime but they share the same fwnode with the parent
platfom device. This patch changes the way the IRQ domain is searched
for the MC devices: it takes the fwnode reference from the parent and
uses the fwnode reference to find the MC IRQ domain.

Signed-off-by: Diana Craciun <diana.craciun@oss.nxp.com>
---
 drivers/bus/fsl-mc/fsl-mc-msi.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-msi.c
index 8b9c66d7c4ff..1e2e97329781 100644
--- a/drivers/bus/fsl-mc/fsl-mc-msi.c
+++ b/drivers/bus/fsl-mc/fsl-mc-msi.c
@@ -182,16 +182,23 @@ int fsl_mc_find_msi_domain(struct device *mc_platform_dev,
 {
 	struct irq_domain *msi_domain;
 	struct device_node *mc_of_node = mc_platform_dev->of_node;
+	struct fwnode_handle *fwnode;
 
-	msi_domain = of_msi_get_domain(mc_platform_dev, mc_of_node,
-				       DOMAIN_BUS_FSL_MC_MSI);
+	msi_domain = dev_get_msi_domain(mc_platform_dev);
 	if (!msi_domain) {
 		pr_err("Unable to find fsl-mc MSI domain for %pOF\n",
 		       mc_of_node);
 
 		return -ENOENT;
 	}
+	fwnode = msi_domain->fwnode;
+	msi_domain = irq_find_matching_fwnode(fwnode, DOMAIN_BUS_FSL_MC_MSI);
+	if (!msi_domain) {
+		pr_err("Unable to find fsl-mc MSI domain for %pOF\n",
+		       mc_of_node);
 
+		return -ENOENT;
+	}
 	*mc_msi_domain = msi_domain;
 	return 0;
 }
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: laurentiu.tudor@nxp.com
To: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org
Cc: lorenzo.pieralisi@arm.com, calvin.johnson@nxp.com,
	ard.biesheuvel@linaro.org, maz@kernel.org, pankaj.bansal@nxp.com,
	diana.craciun@oss.nxp.com, jon@solid-run.com,
	jeremy.linton@arm.com, makarand.pawagi@nxp.com,
	cristian.sovaiala@nxp.com, V.Sethi@nxp.com,
	ioana.ciornei@nxp.com, tglx@linutronix.de, robin.murphy@arm.com,
	joro@8bytes.org, jason@lakedaemon.net, Stuart.Yoder@arm.com
Subject: [RFC PATCH 2/4] irqchip/fsl-mc: Change the way the IRQ domain is set for MC devices
Date: Thu, 27 Feb 2020 12:05:40 +0200	[thread overview]
Message-ID: <20200227100542.13819-2-laurentiu.tudor@nxp.com> (raw)
In-Reply-To: <20200227100542.13819-1-laurentiu.tudor@nxp.com>

From: Diana Craciun <diana.craciun@oss.nxp.com>

In ACPI the MC bus is represented as a platform device and a named
component in the IORT table. The mc-bus devices are discovered
dynamically at runtime but they share the same fwnode with the parent
platfom device. This patch changes the way the IRQ domain is searched
for the MC devices: it takes the fwnode reference from the parent and
uses the fwnode reference to find the MC IRQ domain.

Signed-off-by: Diana Craciun <diana.craciun@oss.nxp.com>
---
 drivers/bus/fsl-mc/fsl-mc-msi.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-msi.c
index 8b9c66d7c4ff..1e2e97329781 100644
--- a/drivers/bus/fsl-mc/fsl-mc-msi.c
+++ b/drivers/bus/fsl-mc/fsl-mc-msi.c
@@ -182,16 +182,23 @@ int fsl_mc_find_msi_domain(struct device *mc_platform_dev,
 {
 	struct irq_domain *msi_domain;
 	struct device_node *mc_of_node = mc_platform_dev->of_node;
+	struct fwnode_handle *fwnode;
 
-	msi_domain = of_msi_get_domain(mc_platform_dev, mc_of_node,
-				       DOMAIN_BUS_FSL_MC_MSI);
+	msi_domain = dev_get_msi_domain(mc_platform_dev);
 	if (!msi_domain) {
 		pr_err("Unable to find fsl-mc MSI domain for %pOF\n",
 		       mc_of_node);
 
 		return -ENOENT;
 	}
+	fwnode = msi_domain->fwnode;
+	msi_domain = irq_find_matching_fwnode(fwnode, DOMAIN_BUS_FSL_MC_MSI);
+	if (!msi_domain) {
+		pr_err("Unable to find fsl-mc MSI domain for %pOF\n",
+		       mc_of_node);
 
+		return -ENOENT;
+	}
 	*mc_msi_domain = msi_domain;
 	return 0;
 }
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-02-27 10:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 10:05 [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation laurentiu.tudor
2020-02-27 10:05 ` laurentiu.tudor
2020-02-27 10:05 ` laurentiu.tudor
2020-02-27 10:05 ` laurentiu.tudor [this message]
2020-02-27 10:05   ` [RFC PATCH 2/4] irqchip/fsl-mc: Change the way the IRQ domain is set for MC devices laurentiu.tudor
2020-02-27 10:05   ` laurentiu.tudor
2020-02-27 10:05 ` [RFC PATCH 3/4] bus: fsl-mc: Add ACPI support for fsl-mc laurentiu.tudor
2020-02-27 10:05   ` laurentiu.tudor
2020-02-27 10:05   ` laurentiu.tudor
2020-02-27 10:05 ` [RFC PATCH 4/4] iommu/of: get rid of fsl-mc specific code laurentiu.tudor
2020-02-27 10:05   ` laurentiu.tudor
2020-02-27 10:05   ` laurentiu.tudor
2020-03-25 12:51 ` [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation Lorenzo Pieralisi
2020-03-25 12:51   ` Lorenzo Pieralisi
2020-03-25 12:51   ` Lorenzo Pieralisi
2020-03-25 16:48   ` Laurentiu Tudor
2020-03-25 16:48     ` Laurentiu Tudor
2020-03-25 16:48     ` Laurentiu Tudor
2020-04-14 14:32     ` Lorenzo Pieralisi
2020-04-14 14:32       ` Lorenzo Pieralisi
2020-04-14 14:32       ` Lorenzo Pieralisi
2020-04-15  5:42       ` [EXT] " Makarand Pawagi
2020-04-15  5:42         ` Makarand Pawagi
2020-04-15  5:42         ` Makarand Pawagi
2020-04-15 15:43         ` Lorenzo Pieralisi
2020-04-15 15:43           ` Lorenzo Pieralisi
2020-04-15 15:43           ` Lorenzo Pieralisi
2020-04-15 15:44       ` Laurentiu Tudor
2020-04-15 15:44         ` Laurentiu Tudor
2020-04-15 15:44         ` Laurentiu Tudor
2020-04-15 16:04         ` Lorenzo Pieralisi
2020-04-15 16:04           ` Lorenzo Pieralisi
2020-04-15 16:04           ` Lorenzo Pieralisi
2020-04-16 14:38           ` Laurentiu Tudor
2020-04-16 14:38             ` Laurentiu Tudor
2020-04-16 14:38             ` Laurentiu Tudor
2020-04-15 17:31         ` Robin Murphy
2020-04-15 17:31           ` Robin Murphy
2020-04-15 17:31           ` Robin Murphy
2020-04-23  9:56           ` [EXT] " Makarand Pawagi
2020-04-23  9:56             ` Makarand Pawagi
2020-04-23  9:56             ` Makarand Pawagi
2020-04-23 11:09             ` Lorenzo Pieralisi
2020-04-23 11:09               ` Lorenzo Pieralisi
2020-04-23 11:09               ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200227100542.13819-2-laurentiu.tudor@nxp.com \
    --to=laurentiu.tudor@nxp.com \
    --cc=Stuart.Yoder@arm.com \
    --cc=V.Sethi@nxp.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=calvin.johnson@nxp.com \
    --cc=cristian.sovaiala@nxp.com \
    --cc=diana.craciun@oss.nxp.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jason@lakedaemon.net \
    --cc=jeremy.linton@arm.com \
    --cc=jon@solid-run.com \
    --cc=joro@8bytes.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=makarand.pawagi@nxp.com \
    --cc=maz@kernel.org \
    --cc=pankaj.bansal@nxp.com \
    --cc=robin.murphy@arm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.