From patchwork Wed Sep 8 12:32:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1525847 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=Zx1wvWDG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H4M3J53xSz9sRf for ; Wed, 8 Sep 2021 22:32:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BB54B81D1F; Wed, 8 Sep 2021 14:32:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="Zx1wvWDG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCA8181F74; Wed, 8 Sep 2021 14:32:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C5C3A8023C for ; Wed, 8 Sep 2021 14:32:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wm1-x332.google.com with SMTP id m25-20020a7bcb99000000b002e751bcb5dbso1398755wmi.5 for ; Wed, 08 Sep 2021 05:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vkGSXCNIYfCVQ8amCl9paK4c51GF6SIppItIlMLMHzg=; b=Zx1wvWDG+Ib4GGvK+1FsfMxaaYonNQ5KXF/NbTY7FYwM2SlXoxdeuQHQ2VAzM6BmeB uEWPfcOFSWlQXfZz1A2dECMhXHvDOHDspDohTsN9c4cW3xslX1AEtBvzPZdbYv1E0FEZ i3H3ymO78Nh/LUeB2M4kCTM3lB4Y68R0gEvHtpdi6NSbpFUFWjs4PBaC3T95WqdFkQO1 +U/BsCbvVdbigdmDswJGlCF2hXAA8UPJoxyHtKRrtrscKVFRH/GgXowmMSpa26p3MeEe EVfEolv2IFEHyk6mI40FFYyYYAUXewGjZVNSu+dEsEhfCzK3yUf+yFydtRpJNTqZpTqX UntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vkGSXCNIYfCVQ8amCl9paK4c51GF6SIppItIlMLMHzg=; b=RjXLM/rgBb7VNZb7yjsN//F7U9bb2pdAdmR09BJYmPNhlBxh/HMXJjITiCX83FMKX9 CEKHVAZeWUQc1WBkxgiDpzmO/ue5bJzLtqBrn8cNdMM4G0M9PhNSUtmvvZlUBJeL8Mbj VqDduyTfze5CpHxFwtA67vxz2w7Ex3vSehVirqUt8WkudJ7+nRtWewZn7ec/X9ktVj8d bEDOZQM8A5FN6RL9l4TVN9cYLPaactw1q/cz/mnSlXbMDGbbpJNsvtKPB0lIKBnXXK2T 0iJ8Nx93jGN8OCDZ2Tbtpk1h/5dUr6RbJtdYn2h+8qblwhVZz8RzhzUOMPJ6ozrpKCvg vJxw== X-Gm-Message-State: AOAM530P9p+1eeyoC4kDABVUkyoh8h7ZjxkiwrK7gud86H/agfHLUlqc MTrV9Fuxrsv0f66A82mHdYZg9RR+32xfEmqG X-Google-Smtp-Source: ABdhPJzEA2LdauxaQMLRAAiI3PjOEj3/JG5isiWCKJQqOB90ZEbgkTV5/zj4+2oFAqHX4idibSHNcA== X-Received: by 2002:a05:600c:898:: with SMTP id l24mr3317691wmp.90.1631104337893; Wed, 08 Sep 2021 05:32:17 -0700 (PDT) Received: from localhost.localdomain ([2001:861:44c0:66c0:19d:2e13:ec0a:9d59]) by smtp.gmail.com with ESMTPSA id p13sm2052118wro.8.2021.09.08.05.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 05:32:17 -0700 (PDT) From: Neil Armstrong To: u-boot@lists.denx.de Cc: u-boot-amlogic@groups.io, Neil Armstrong , Art Nikpal Subject: [PATCH] pci: pcie_dw_meson: fix usb fail when pci link fails to go up Date: Wed, 8 Sep 2021 14:32:12 +0200 Message-Id: <20210908123212.382716-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1135; h=from:subject; bh=1MZY+CrwxrvhU7rQuGe/tdF0RLVoBTlWHbtnPKVQRbI=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBhOK01fXiJ32d8A9mpXRceXktD5Ki9qtSwSW5P+G5V OiVM1NiJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCYTitNQAKCRB33NvayMhJ0WsVEA C7Zze4JRF8/DJ4+TtXfeVKXb5O3VlEJ8/c9ufnvcIanf8oMXmcEEFSaChntG5RBX7n3Ni70Sz1sHG3 rem+c3y+MFacbSNcH4wkJ1lYofg8NijxHpEhdEbW8Aku43Twd5ovejDoFIgYQwqjmdkf1YZrji5mrD zoC2gUoQM6OaOH/QKi/sE+IWsLyYH36vkT3PthhfBLO3xtQHXl6AuNv3lVpq4oRdxOSMCM55/JGMzT 9liIKJfByAZRzxmqrKFxSkhyzsBizeD+/IObg3j0/d+e69EmEfYejkKZY3GmCCFbojzekAKRApnQoe Jt9EYpPAKjncyJ4NFP8WMSNhA7PIZ+4c68kj/uU0SrHJ2yWkjVGCxIEkW3ajh0zBTy9OWS9DJo8bxU IOYOJbJDg/6NF4hnzjHQxlWvawEs2aACkZkCtY0JlIOt2Dt5+vaCcPym0wjB5N5zE8Qub0coUsdU1b 8JjiB29sTFitxh4JRmDO0tsxHeIhTgziJUcG9NqaNl49vbH7qOj7YcatTiRWRPlOJ/4MIwiGgCmRIx zHYBSd+OtZiBeXteU40Wjqx0yHrt0ftwVE5sNNNlJck4uRcgC3/fr+mibPUh1h7r1JjfOx5ODYibIs OeVs2p5OrGB/2Yl7KtNGgrQLJNuXWZGXwUKCAg13fKccKoQNbeADyx627rNA== X-Developer-Key: i=narmstrong@baylibre.com; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 Signed-off-by: Neil Armstrong Reviewed-by: Bin Meng --- 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: