From: Bjorn Helgaas <helgaas@kernel.org>
To: Frank Li <Frank.li@nxp.com>
Cc: Tim Harvey <tharvey@gateworks.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
Lucas Stach <l.stach@pengutronix.de>,
linux-pci@vger.kernel.org
Subject: Re: legacy PCI device behind a bridge not getting a valid IRQ on imx host controller
Date: Fri, 30 Aug 2024 11:15:55 -0500 [thread overview]
Message-ID: <20240830161555.GA104439@bhelgaas> (raw)
In-Reply-To: <ZtHqExOsk2/tl69w@lizhi-Precision-Tower-5810>
On Fri, Aug 30, 2024 at 11:49:39AM -0400, Frank Li wrote:
> On Thu, Aug 29, 2024 at 05:00:05PM -0500, Bjorn Helgaas wrote:
> > On Thu, Aug 29, 2024 at 05:43:42PM -0400, Frank Li wrote:
> > > On Thu, Aug 29, 2024 at 04:22:35PM -0500, Bjorn Helgaas wrote:
> > > > On Wed, Aug 28, 2024 at 02:40:33PM -0700, Tim Harvey wrote:
> > > > > Greetings,
> > > > >
> > > > > I have a user that is using an IMX8MM SoC (dwc controller) with a
> > > > > miniPCIe card that has a PEX8112 PCI-to-PCIe bridge to a legacy PCI
> > > > > device and the device is not getting a valid interrupt.
> > > >
> > > > Does pci-imx6.c support INTx at all?
> > >
> > > Yes, dwc controller map INTx message to 4 irq lines, which connect to GIC.
> > > we tested it by add nomsi in kernel command line.
> >
> > Thanks, Frank. Can you point me to the dwc code where this happens?
> > Maybe I can remember this for next time or add a comment to help
> > people find it.
>
> I think it needn't special code to handle this. in dts
>
> interrupt-map = <0 0 0 1 &gic GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
> <0 0 0 2 &gic GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
> <0 0 0 3 &gic GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
> <0 0 0 4 &gic GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
>
> It map INT(A,B,C,D) to 4 GIC irq.
OK, thanks! I guess this happens in the of_irq_parse_pci() path, e.g.:
imx6_pcie_probe
dw_pcie_host_init
devm_pci_alloc_host_bridge
devm_of_pci_bridge_init
bridge->map_irq = of_irq_parse_and_map_pci
pci_device_probe # pci_bus_type.probe
pci_assign_irq
bridge->map_irq()
of_irq_parse_and_map_pci
of_irq_parse_pci
of_irq_parse_one
of_irq_parse_raw
of_get_property(ipar, "interrupt-map", &imaplen)
So there really isn't any mention of INTx directly in imx6 or the dwc
core.
I suppose something like:
- Set CONFIG_DYNAMIC_DEBUG=y
- Boot with kernel parameters:
ignore_loglevel dyndbg="file drivers/pci/* +p; file drivers/of/* +p"
should enable some debug output related to this.
Bjorn
next prev parent reply other threads:[~2024-08-30 16:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 21:40 legacy PCI device behind a bridge not getting a valid IRQ on imx host controller Tim Harvey
2024-08-29 21:22 ` Bjorn Helgaas
2024-08-29 21:43 ` Frank Li
2024-08-29 22:00 ` Bjorn Helgaas
2024-08-29 22:21 ` Tim Harvey
2024-08-30 15:52 ` Frank Li
2024-08-30 16:11 ` Tim Harvey
2024-08-30 15:49 ` Frank Li
2024-08-30 16:06 ` Manivannan Sadhasivam
2024-08-30 16:15 ` Bjorn Helgaas [this message]
2024-08-30 1:50 ` Hongxing Zhu
2024-08-30 16:03 ` Tim Harvey
2024-08-30 16:14 ` Frank Li
2024-09-06 19:37 ` Tim Harvey
2024-09-06 19:58 ` Bjorn Helgaas
2024-09-10 16:50 ` Tim Harvey
2024-09-10 23:04 ` Bjorn Helgaas
2024-09-12 23:28 ` Tim Harvey
2024-09-23 17:56 ` Tim Harvey
2024-09-26 22:30 ` 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=20240830161555.GA104439@bhelgaas \
--to=helgaas@kernel.org \
--cc=Frank.li@nxp.com \
--cc=hongxing.zhu@nxp.com \
--cc=l.stach@pengutronix.de \
--cc=linux-pci@vger.kernel.org \
--cc=tharvey@gateworks.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.