All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove
@ 2021-04-16 20:30 Tim Harvey
  2021-04-16 20:33 ` Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tim Harvey @ 2021-04-16 20:30 UTC (permalink / raw)
  To: u-boot

commit 6ecbe1375671 ("drivers: pci: imx: add imx_pcie_remove function")
attempted to resolve an issue caused by MX6QDL not having a proper
intneral PCIe core reset and thus hanging during kernel init if the
bootloader had enabled PCI.

The issue exists for IMX6Q, IMX6D, IXM6S, and IMX6DL. Fix the case for
IMX6S and IMX6DL getting missed.

This fixes IMX6S and IMX6DL with PCI enabled in U-Boot booting for
Linux v4.11+.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 drivers/pci/pcie_imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index d9c2325a22..73875e00db 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -473,7 +473,7 @@ static int imx6_pcie_assert_core_reset(struct imx_pcie_priv *priv,
 	 * If both LTSSM_ENABLE and REF_SSP_ENABLE are active we have a strong
 	 * indication that the bootloader activated the link.
 	 */
-	if (is_mx6dq() && prepare_for_boot) {
+	if ((is_mx6dq() || is_mx6sdl()) && prepare_for_boot) {
 		u32 val, gpr1, gpr12;
 
 		gpr1 = readl(&iomuxc_regs->gpr[1]);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove
  2021-04-16 20:30 [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove Tim Harvey
@ 2021-04-16 20:33 ` Fabio Estevam
  2021-04-16 20:41 ` Fabio Estevam
  2021-05-02 11:43 ` stefano.babic at babic.homelinux.org
  2 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2021-04-16 20:33 UTC (permalink / raw)
  To: u-boot

Hi Tim,

On Fri, Apr 16, 2021 at 5:30 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> commit 6ecbe1375671 ("drivers: pci: imx: add imx_pcie_remove function")
> attempted to resolve an issue caused by MX6QDL not having a proper
> intneral PCIe core reset and thus hanging during kernel init if the
> bootloader had enabled PCI.
>
> The issue exists for IMX6Q, IMX6D, IXM6S, and IMX6DL. Fix the case for
> IMX6S and IMX6DL getting missed.
>
> This fixes IMX6S and IMX6DL with PCI enabled in U-Boot booting for
> Linux v4.11+.
>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>

Thanks for the fix:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove
  2021-04-16 20:30 [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove Tim Harvey
  2021-04-16 20:33 ` Fabio Estevam
@ 2021-04-16 20:41 ` Fabio Estevam
  2021-04-16 20:48   ` Tim Harvey
  2021-05-02 11:43 ` stefano.babic at babic.homelinux.org
  2 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2021-04-16 20:41 UTC (permalink / raw)
  To: u-boot

Hi Tim,

Some more comments.

On Fri, Apr 16, 2021 at 5:30 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> commit 6ecbe1375671 ("drivers: pci: imx: add imx_pcie_remove function")
> attempted to resolve an issue caused by MX6QDL not having a proper
> intneral PCIe core reset and thus hanging during kernel init if the

"internal"

> --- a/drivers/pci/pcie_imx.c
> +++ b/drivers/pci/pcie_imx.c
> @@ -473,7 +473,7 @@ static int imx6_pcie_assert_core_reset(struct imx_pcie_priv *priv,
>          * If both LTSSM_ENABLE and REF_SSP_ENABLE are active we have a strong
>          * indication that the bootloader activated the link.
>          */
> -       if (is_mx6dq() && prepare_for_boot) {
> +       if ((is_mx6dq() || is_mx6sdl()) && prepare_for_boot) {

It seems that i.MX6QP is missing. What about adding is_mx6dqp() too?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove
  2021-04-16 20:41 ` Fabio Estevam
@ 2021-04-16 20:48   ` Tim Harvey
  2021-04-16 21:12     ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Harvey @ 2021-04-16 20:48 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 16, 2021 at 1:41 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Tim,
>
> Some more comments.
>
> On Fri, Apr 16, 2021 at 5:30 PM Tim Harvey <tharvey@gateworks.com> wrote:
> >
> > commit 6ecbe1375671 ("drivers: pci: imx: add imx_pcie_remove function")
> > attempted to resolve an issue caused by MX6QDL not having a proper
> > intneral PCIe core reset and thus hanging during kernel init if the
>
> "internal"
>

Fabio,

Thanks, I will correct this for a v2

> > --- a/drivers/pci/pcie_imx.c
> > +++ b/drivers/pci/pcie_imx.c
> > @@ -473,7 +473,7 @@ static int imx6_pcie_assert_core_reset(struct imx_pcie_priv *priv,
> >          * If both LTSSM_ENABLE and REF_SSP_ENABLE are active we have a strong
> >          * indication that the bootloader activated the link.
> >          */
> > -       if (is_mx6dq() && prepare_for_boot) {
> > +       if ((is_mx6dq() || is_mx6sdl()) && prepare_for_boot) {
>
> It seems that i.MX6QP is missing. What about adding is_mx6dqp() too?

The QP has a soft reset bit such that this isn't an issue. For
reference I'm basing this off the kernel 'fixup' that was removed in
v4.11 which can be found here:
https://elixir.bootlin.com/linux/v4.10.17/source/drivers/pci/host/pci-imx6.c#L269

I'm the one who authored the original patch and it was my mistake way
back then to use 'is_mx6dq()' in U-Boot thinking that it covered all
the early IMX6's that lacked a PCIe soft reset.

Tim

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove
  2021-04-16 20:48   ` Tim Harvey
@ 2021-04-16 21:12     ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2021-04-16 21:12 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 16, 2021 at 5:48 PM Tim Harvey <tharvey@gateworks.com> wrote:

> The QP has a soft reset bit such that this isn't an issue. For

Yes, I missed that the i.MX6QP has fixed this issue.

Thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove
  2021-04-16 20:30 [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove Tim Harvey
  2021-04-16 20:33 ` Fabio Estevam
  2021-04-16 20:41 ` Fabio Estevam
@ 2021-05-02 11:43 ` stefano.babic at babic.homelinux.org
  2 siblings, 0 replies; 6+ messages in thread
From: stefano.babic at babic.homelinux.org @ 2021-05-02 11:43 UTC (permalink / raw)
  To: u-boot

> commit 6ecbe1375671 ("drivers: pci: imx: add imx_pcie_remove function")
> attempted to resolve an issue caused by MX6QDL not having a proper
> intneral PCIe core reset and thus hanging during kernel init if the
> bootloader had enabled PCI.
> The issue exists for IMX6Q, IMX6D, IXM6S, and IMX6DL. Fix the case for
> IMX6S and IMX6DL getting missed.
> This fixes IMX6S and IMX6DL with PCI enabled in U-Boot booting for
> Linux v4.11+.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-02 11:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 20:30 [PATCH] pci: imx: disable imx6sdl LTSSM upon driver remove Tim Harvey
2021-04-16 20:33 ` Fabio Estevam
2021-04-16 20:41 ` Fabio Estevam
2021-04-16 20:48   ` Tim Harvey
2021-04-16 21:12     ` Fabio Estevam
2021-05-02 11:43 ` stefano.babic at babic.homelinux.org

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.