[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <000001cec4ad$78640450$692c0cf0$%han@samsung.com>
Date: Wed, 09 Oct 2013 14:07:36 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Kishon Vijay Abraham I' <kishon@...com>
Cc: 'Bjorn Helgaas' <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
'Kukjin Kim' <kgene.kim@...sung.com>,
'Pratyush Anand' <pratyush.anand@...com>,
'Mohit KUMAR' <Mohit.KUMAR@...com>,
'Siva Reddy Kallam' <siva.kallam@...sung.com>,
'SRIKANTH TUMKUR SHIVANAND' <ts.srikanth@...sung.com>,
'Arnd Bergmann' <arnd@...db.de>,
'Sean Cross' <xobs@...agi.com>,
'Thierry Reding' <thierry.reding@...il.com>,
'Thomas Petazzoni' <thomas.petazzoni@...e-electrons.com>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH V3] PCI: exynos: add support for MSI
On Tuesday, October 08, 2013 3:23 PM, Kishon Vijay Abraham I wrote:
> On Friday 06 September 2013 12:24 PM, Jingoo Han wrote:
> > This patch adds support for Message Signaled Interrupt in the
> > Exynos PCIe diver using Synopsys designware PCIe core IP.
> >
> > Signed-off-by: Siva Reddy Kallam <siva.kallam@...sung.com>
> > Signed-off-by: Srikanth T Shivanand <ts.srikanth@...sung.com>
> > Signed-off-by: Jingoo Han <jg1.han@...sung.com>
> > Cc: Pratyush Anand <pratyush.anand@...com>
> > Cc: Mohit KUMAR <Mohit.KUMAR@...com>
> > ---
[.....]
> > int __init dw_pcie_host_init(struct pcie_port *pp)
> > {
> > struct device_node *np = pp->dev->of_node;
> > @@ -157,6 +372,8 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
> > struct of_pci_range_parser parser;
> > u32 val;
> >
> > + struct irq_domain *irq_domain;
> > +
> > if (of_pci_range_parser_init(&parser, np)) {
> > dev_err(pp->dev, "missing ranges property\n");
> > return -EINVAL;
> > @@ -223,6 +440,18 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
> > return -EINVAL;
> > }
> >
> > + if (IS_ENABLED(CONFIG_PCI_MSI)) {
> > + irq_domain = irq_domain_add_linear(pp->dev->of_node,
> > + MAX_MSI_IRQS, &msi_domain_ops,
> > + &dw_pcie_msi_chip);
> > + if (!irq_domain) {
> > + dev_err(pp->dev, "irq domain init failed\n");
> > + return -ENXIO;
> > + }
> > +
> > + pp->msi_irq_start = irq_find_mapping(irq_domain, 0);
>
> Where is the irq_create_mapping done for this irq domain? Is that not needed?
> Without that I'm not getting the correct irq number.
Oh, you're right.
irq_create_mapping() is necessary!
Without irq_create_mapping(), it makes the ugly NULL deference
when two PCIe controllers are used on Exynos5440.
It is my mistake.
I will add irq_create_mapping() to dw_msi_setup_irq(), as tegra PCIe driver
did. I will send the patch, soon.
I really appreciate your comment. :-)
Thank you.
Best regards,
Jingoo Han
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists