From: helgaas@kernel.org (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 6/6] PCI: layerscape: add ls_pcie_msi_host_init
Date: Wed, 21 Oct 2015 16:34:16 -0500 [thread overview]
Message-ID: <20151021213416.GJ1583@localhost> (raw)
In-Reply-To: <1444979960-24100-6-git-send-email-Minghuan.Lian@freescale.com>
Hi Minghuan,
On Fri, Oct 16, 2015 at 03:19:20PM +0800, Minghuan Lian wrote:
> Layerscape PCIe has its own MSI implementation. The patch registers
> ls_pcie_msi_host_init() to avoid using Designware's MSI.
>
> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
> ---
> Change log
> v4: split from [PATCH v3] PCI: layerscape: Add PCIe support for LS1043a and LS2080a
>
> drivers/pci/host/pci-layerscape.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
> index c53692a..8fac6c8 100644
> --- a/drivers/pci/host/pci-layerscape.c
> +++ b/drivers/pci/host/pci-layerscape.c
> @@ -150,14 +150,31 @@ static void ls_pcie_host_init(struct pcie_port *pp)
> 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;
> +
> + 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;
I don't see how this can be right. I think it's OK if you want to enforce
the presence of "msi-parent", but the other implementations of
.msi_host_init (ks_dw_pcie_msi_host_init() and the default implementation
in dw_pcie_host_init()) both set pp->irq_domain and call
irq_create_mapping().
You don't do either of those, so I don't see how MSIs can work, because I
assume the generic DesignWare code will depend on pp->irq_domain. If
you're planning to add more Layerscape-specific MSI support later, I think
you should wait and include this patch with that work.
> +}
> +
> static struct pcie_host_ops ls1021_pcie_host_ops = {
> .link_up = ls1021_pcie_link_up,
> .host_init = ls1021_pcie_host_init,
> + .msi_host_init = ls_pcie_msi_host_init,
> };
>
> static struct pcie_host_ops ls_pcie_host_ops = {
> .link_up = ls_pcie_link_up,
> .host_init = ls_pcie_host_init,
> + .msi_host_init = ls_pcie_msi_host_init,
> };
>
> static struct ls_pcie_drvdata ls1021_drvdata = {
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-21 21:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 7:19 [PATCH v4 1/6] PCI: layerscape: remove ls_pcie_establish_link() Minghuan Lian
2015-10-16 7:19 ` [PATCH v4 2/6] PCI: layerscape: check PCIe controller work mode Minghuan Lian
2015-10-16 7:19 ` [PATCH v4 3/6] PCI: layerscape: factor out SCFG related function Minghuan Lian
2015-10-16 7:19 ` [PATCH v4 4/6] PCI: layerscape: update ls_add_pcie_port() Minghuan Lian
2015-10-16 7:19 ` [PATCH v4 5/6] PCI: layerscape: add PCIe support for LS1043a and LS2080a Minghuan Lian
2015-10-21 21:36 ` Bjorn Helgaas
2015-10-22 17:38 ` Li Yang
2015-10-22 18:08 ` Bjorn Helgaas
2015-10-22 19:17 ` Li Yang
2015-10-23 6:02 ` Lian M.H.
2015-11-02 21:08 ` Li Yang
2015-11-02 21:36 ` Bjorn Helgaas
2015-10-22 15:47 ` Bjorn Helgaas
2015-10-23 5:48 ` Lian M.H.
2015-10-16 7:19 ` [PATCH v4 6/6] PCI: layerscape: add ls_pcie_msi_host_init Minghuan Lian
2015-10-21 21:34 ` Bjorn Helgaas [this message]
2015-10-22 3:03 ` Lian M.H.
2015-10-22 16:21 ` Bjorn Helgaas
2015-10-23 3:39 ` Lian M.H.
2015-11-02 21:06 ` Bjorn Helgaas
2015-11-03 6:08 ` Lian M.H.
2015-10-21 21:40 ` [PATCH v4 1/6] PCI: layerscape: remove ls_pcie_establish_link() Bjorn Helgaas
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=20151021213416.GJ1583@localhost \
--to=helgaas@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).