Commit 61c08240 authored by Marc Zyngier's avatar Marc Zyngier

of/irq: Use of_msi_get_domain instead of open-coded "msi-parent" parsing

Now that we have a function that implements the complexity of the
"msi-parent" property parsing, switch to that.
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 48ae34fb
...@@ -579,26 +579,6 @@ void __init of_irq_init(const struct of_device_id *matches) ...@@ -579,26 +579,6 @@ void __init of_irq_init(const struct of_device_id *matches)
} }
} }
/**
* of_msi_configure - Set the msi_domain field of a device
* @dev: device structure to associate with an MSI irq domain
* @np: device node for that device
*/
void of_msi_configure(struct device *dev, struct device_node *np)
{
struct device_node *msi_np;
struct irq_domain *d;
msi_np = of_parse_phandle(np, "msi-parent", 0);
if (!msi_np)
return;
d = irq_find_matching_host(msi_np, DOMAIN_BUS_PLATFORM_MSI);
if (!d)
d = irq_find_host(msi_np);
dev_set_msi_domain(dev, d);
}
/** /**
* of_msi_map_rid - Map a MSI requester ID for a device. * of_msi_map_rid - Map a MSI requester ID for a device.
* @dev: device for which the mapping is to be done. * @dev: device for which the mapping is to be done.
...@@ -741,3 +721,14 @@ struct irq_domain *of_msi_get_domain(struct device *dev, ...@@ -741,3 +721,14 @@ struct irq_domain *of_msi_get_domain(struct device *dev,
return NULL; return NULL;
} }
/**
* of_msi_configure - Set the msi_domain field of a device
* @dev: device structure to associate with an MSI irq domain
* @np: device node for that device
*/
void of_msi_configure(struct device *dev, struct device_node *np)
{
dev_set_msi_domain(dev,
of_msi_get_domain(dev, np, DOMAIN_BUS_PLATFORM_MSI));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment