* [PATCH] pci: pcie_dw_meson: fix usb fail when pci link fails to go up
@ 2021-09-08 12:32 Neil Armstrong
2021-09-08 12:59 ` Bin Meng
2021-09-21 7:27 ` Neil Armstrong
0 siblings, 2 replies; 3+ messages in thread
From: Neil Armstrong @ 2021-09-08 12:32 UTC (permalink / raw)
To: u-boot; +Cc: u-boot-amlogic, Neil Armstrong, Art Nikpal
On Amlogic A311D, when the PCIe link fails disabling the related clocks
makes USB fail. For an unknown reason, this doesn happen on the S905D3 SoC.
Mimic the Linux behavior by not considering a link failure a probe failure,
and continue even if the PCIe link is down.
Reported-by: Art Nikpal <email2tema@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/pci/pcie_dw_meson.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/pci/pcie_dw_meson.c b/drivers/pci/pcie_dw_meson.c
index 0525ecbea6..07da9fa533 100644
--- a/drivers/pci/pcie_dw_meson.c
+++ b/drivers/pci/pcie_dw_meson.c
@@ -319,15 +319,9 @@ static int meson_pcie_init_port(struct udevice *dev)
pcie_dw_setup_host(&priv->dw);
- ret = meson_pcie_link_up(priv, LINK_SPEED_GEN_2);
- if (ret < 0)
- goto err_link_up;
+ meson_pcie_link_up(priv, LINK_SPEED_GEN_2);
return 0;
-err_link_up:
- clk_disable(&priv->clk_port);
- clk_disable(&priv->clk_general);
- clk_disable(&priv->clk_pclk);
err_deassert_bulk:
reset_assert_bulk(&priv->rsts);
err_power_off_phy:
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: pcie_dw_meson: fix usb fail when pci link fails to go up
2021-09-08 12:32 [PATCH] pci: pcie_dw_meson: fix usb fail when pci link fails to go up Neil Armstrong
@ 2021-09-08 12:59 ` Bin Meng
2021-09-21 7:27 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Bin Meng @ 2021-09-08 12:59 UTC (permalink / raw)
To: Neil Armstrong; +Cc: U-Boot Mailing List, u-boot-amlogic, Art Nikpal
On Wed, Sep 8, 2021 at 8:32 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> On Amlogic A311D, when the PCIe link fails disabling the related clocks
> makes USB fail. For an unknown reason, this doesn happen on the S905D3 SoC.
>
> Mimic the Linux behavior by not considering a link failure a probe failure,
> and continue even if the PCIe link is down.
>
> Reported-by: Art Nikpal <email2tema@gmail.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/pci/pcie_dw_meson.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: pcie_dw_meson: fix usb fail when pci link fails to go up
2021-09-08 12:32 [PATCH] pci: pcie_dw_meson: fix usb fail when pci link fails to go up Neil Armstrong
2021-09-08 12:59 ` Bin Meng
@ 2021-09-21 7:27 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2021-09-21 7:27 UTC (permalink / raw)
To: u-boot; +Cc: u-boot-amlogic, Art Nikpal
On 08/09/2021 14:32, Neil Armstrong wrote:
> On Amlogic A311D, when the PCIe link fails disabling the related clocks
> makes USB fail. For an unknown reason, this doesn happen on the S905D3 SoC.
>
> Mimic the Linux behavior by not considering a link failure a probe failure,
> and continue even if the PCIe link is down.
>
> Reported-by: Art Nikpal <email2tema@gmail.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/pci/pcie_dw_meson.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/pci/pcie_dw_meson.c b/drivers/pci/pcie_dw_meson.c
> index 0525ecbea6..07da9fa533 100644
> --- a/drivers/pci/pcie_dw_meson.c
> +++ b/drivers/pci/pcie_dw_meson.c
> @@ -319,15 +319,9 @@ static int meson_pcie_init_port(struct udevice *dev)
>
> pcie_dw_setup_host(&priv->dw);
>
> - ret = meson_pcie_link_up(priv, LINK_SPEED_GEN_2);
> - if (ret < 0)
> - goto err_link_up;
> + meson_pcie_link_up(priv, LINK_SPEED_GEN_2);
>
> return 0;
> -err_link_up:
> - clk_disable(&priv->clk_port);
> - clk_disable(&priv->clk_general);
> - clk_disable(&priv->clk_pclk);
> err_deassert_bulk:
> reset_assert_bulk(&priv->rsts);
> err_power_off_phy:
>
Applied to u-boot-amlogic-next
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-21 7:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 12:32 [PATCH] pci: pcie_dw_meson: fix usb fail when pci link fails to go up Neil Armstrong
2021-09-08 12:59 ` Bin Meng
2021-09-21 7:27 ` Neil Armstrong
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.