Re: [PATCH 2/3] pci: pcie-designware: add support for external MSI controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Aug 30, 2016 at 02:57:09PM +0200, Thomas Petazzoni wrote:
> The Designware PCIe controllers have a built-in MSI controller, which is
> already supported by the existing. However, in some situations, it might

                                   ^ driver.

> be a better choice to use an external MSI controller, especially when it
> provides a higher number of MSI interrupts than the built-in one.
> 
> Therefore, this commit extends the pcie-designware driver to support the
> "msi-parent" DT property, already used by other drivers. It contains a
> phandle pointing to the external MSI controller to be used.
> 
> Following this commit, the pcie-designware code supports three
> possibilities, in this order:
> 
>  1. If msi-parent is provided, then the MSI controller pointed by this

                                                                 ^ to  

>     property is used.

>  	if (IS_ENABLED(CONFIG_PCI_MSI)) {
> -		if (!pp->ops->msi_host_init) {
> +		if (of_find_property(pp->dev->of_node, "msi-parent", NULL)) {
> +			struct device_node *msi_node;
> +
> +			msi_node = of_parse_phandle(pp->dev->of_node,
> +						    "msi-parent", 0);
> +			if (!msi_node)
> +				return -ENODEV;
> +
> +			msi = of_pci_find_msi_chip_by_node(msi_node);

By this point, device tree tells us the external MSI controller
should exist. So if we get a NULL here, should we not return
-EPROBE_DIFFERED?

	Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux