mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 23:29:46 +00:00
PCI: layerscape: Add ls_pcie_msi_host_init()
Layerscape PCIe has its own MSI implementation. Register ls_pcie_msi_host_init() to avoid using DesignWare's MSI. [bhelgaas: add comment] Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
5192ec7b24
commit
bd33b87a9a
@ -150,14 +150,37 @@ static void ls_pcie_host_init(struct pcie_port *pp)
|
|||||||
iowrite32(0, pcie->dbi + PCIE_DBI_RO_WR_EN);
|
iowrite32(0, pcie->dbi + PCIE_DBI_RO_WR_EN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ls_pcie_msi_host_init(struct pcie_port *pp,
|
||||||
|
struct msi_controller *chip)
|
||||||
|
{
|
||||||
|
struct device_node *msi_node;
|
||||||
|
struct device_node *np = pp->dev->of_node;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The MSI domain is set by the generic of_msi_configure(). This
|
||||||
|
* .msi_host_init() function keeps us from doing the default MSI
|
||||||
|
* domain setup in dw_pcie_host_init() and also enforces the
|
||||||
|
* requirement that "msi-parent" exists.
|
||||||
|
*/
|
||||||
|
msi_node = of_parse_phandle(np, "msi-parent", 0);
|
||||||
|
if (!msi_node) {
|
||||||
|
dev_err(pp->dev, "failed to find msi-parent\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static struct pcie_host_ops ls1021_pcie_host_ops = {
|
static struct pcie_host_ops ls1021_pcie_host_ops = {
|
||||||
.link_up = ls1021_pcie_link_up,
|
.link_up = ls1021_pcie_link_up,
|
||||||
.host_init = ls1021_pcie_host_init,
|
.host_init = ls1021_pcie_host_init,
|
||||||
|
.msi_host_init = ls_pcie_msi_host_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct pcie_host_ops ls_pcie_host_ops = {
|
static struct pcie_host_ops ls_pcie_host_ops = {
|
||||||
.link_up = ls_pcie_link_up,
|
.link_up = ls_pcie_link_up,
|
||||||
.host_init = ls_pcie_host_init,
|
.host_init = ls_pcie_host_init,
|
||||||
|
.msi_host_init = ls_pcie_msi_host_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ls_pcie_drvdata ls1021_drvdata = {
|
static struct ls_pcie_drvdata ls1021_drvdata = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user