From: Marek Vasut <marex@denx.de>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: "Tim Harvey" <tharvey@gateworks.com>,
"Shawn Guo" <shawn.guo@freescale.com>,
"Richard Zhu" <r65037@freescale.com>,
"Fabio Estevam" <festevam@gmail.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"David Müller \"(ELSOFT AG)\"" <d.mueller@elsoft.ch>,
"Sascha Hauer" <kernel@pengutronix.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"Fabio Estevam" <fabio.estevam@freescale.com>
Subject: Re: [RFC] PCI: pci-imx6: Add delay to workaround kernel hang
Date: Fri, 18 Jul 2014 11:44:58 +0200 [thread overview]
Message-ID: <201407181144.58342.marex@denx.de> (raw)
In-Reply-To: <1405675599.6072.8.camel@weser.hi.pengutronix.de>
On Friday, July 18, 2014 at 11:26:39 AM, Lucas Stach wrote:
> Hi Tim,
>
> Am Donnerstag, den 26.06.2014, 17:29 -0700 schrieb Tim Harvey:
> [...]
>
> > Shawn / Richard,
> >
> > I am also affected by this issue on IMX6 boards that I support. If I
> > enable PCI in the bootloader I see similar hangs.
> >
> > I have the following hardware configurations on my bench:
> > 1. IMX6DL + i210 (same PCI setup as Fabio's above, but DL instead of Q)
> > 2. IMX6Q + ath9k device
> > 3. IMX6DL + PLX PEX860x PCIe-to-PCIe bridge with various devices
> >
> > behind the bridge, using a clock buffer from IMX6 PCIe clock
> >
> > 4. IMX6Q + PLX PEX860x PCIe-to-PCIe bridge with various devices
> >
> > behind the bridge, using a clock buffer from IMX6 PCIe clock
> >
> > 5. IMX6Q + PLX PEX860x PCIe-to-PCIe bridge with various devices
> >
> > behind the bridge using a clock generator (always on, ignoring the
> > PCIe clock)
> >
> > For all of the above I have no PCI issues using
> > 3.14/3.15/3.16-rc2/vendor 3.10.17_1.0.0_ga unless I enable PCI in the
> > bootloader. When I do so, all of the above configurations hang
> > somewhere around PCI init/enumeration. The same occurs with the most
> > recent vendor kernel 3.10.17_1.0.0_ga kernel (works when PCI is
> > disabled in the bootloader, hangs otherwise).
> >
> > When I apply Fabio's patch above to the 3.16-rc2 kernel I find that
> > scenarios #4 and #5 above then work, #3 boots but the PLX bridge fails
> > all config cycles (0xff's), #2 boots but with no PCIe link, and #1
> > above still hangs. Previously, when I have dug into this particular
> > 'hang' issue on 3.15 I found that the delay needed to be between
> > imx6_pcie_probe() requesting and asserting reset_gpio low, and before
> > setting IOMUX_GPR1:18 to power down the PCIe PHY (note here, that the
> > PHY is currently enabled in the bootloader when PCI is enabled there).
> >
> > When I apply Fabio's patch above to the most recent vendor kernel
> > 3.10.17_1.0.0_ga I still hang in all cases.
> >
> > So while I agree there is something horribly wrong with IMX6 PCI
> > still, I don't think Fabio's patch is the right solution and I don't
> > have anything better at this point in time. I'm happy to share any
> > hardware with anyone that can work through this issue.
>
> Can you try if the attached patch makes any difference?
>
> Regards,
> Lucas
> ------------------------------>8---------------------------------
> From 0e2fc443c760290166f6371d50813e6c30a678da Mon Sep 17 00:00:00 2001
> From: Lucas Stach <l.stach@pengutronix.de>
> Date: Thu, 17 Jul 2014 18:54:44 +0200
> Subject: [PATCH] try forcing LTSSM into detect state
>
> ---
> drivers/pci/host/pci-imx6.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
> index a568efaa331c..afa450c54aba 100644
> --- a/drivers/pci/host/pci-imx6.c
> +++ b/drivers/pci/host/pci-imx6.c
> @@ -215,6 +215,8 @@ static int imx6_pcie_assert_core_reset(struct pcie_port
> *pp) {
> struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp);
>
> + regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12,
> + IMX6Q_GPR12_PCIE_CTL_2, 0 << 10);
> regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
> IMX6Q_GPR1_PCIE_TEST_PD, 1 << 18);
> regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
Tried this, among many other things, but please let someone else also re-verify
this. What I observed is that the LTSSM cannot leave the POLLING phase .
next prev parent reply other threads:[~2014-07-18 11:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 19:18 [RFC] PCI: pci-imx6: Add delay to workaround kernel hang Fabio Estevam
2014-06-25 21:28 ` Marek Vasut
2014-06-26 3:12 ` Shawn Guo
2014-06-26 3:43 ` Fabio Estevam
2014-06-26 5:49 ` Shawn Guo
2014-06-26 9:13 ` Marek Vasut
2014-06-27 0:29 ` Tim Harvey
2014-06-27 10:06 ` Hong-Xing.Zhu
2014-07-17 0:28 ` Tim Harvey
2014-07-18 9:26 ` Lucas Stach
2014-07-18 9:44 ` Marek Vasut [this message]
2014-07-18 11:44 ` "David Müller (ELSOFT AG)"
2014-06-26 7:32 ` Juergen Borleis
2014-06-26 9:17 ` Marek Vasut
2014-06-26 9:26 ` Juergen Borleis
2014-06-26 9:50 ` Marek Vasut
2014-06-26 11:43 ` Fabio Estevam
2014-06-26 8:41 ` Lucas Stach
2014-07-17 6:51 ` Uwe Kleine-König
2014-07-17 8:23 ` Marek Vasut
2014-07-17 15:27 ` Shawn Guo
2014-07-18 20:46 ` Marek Vasut
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=201407181144.58342.marex@denx.de \
--to=marex@denx.de \
--cc=bhelgaas@google.com \
--cc=d.mueller@elsoft.ch \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=r65037@freescale.com \
--cc=shawn.guo@freescale.com \
--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 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).