From patchwork Wed Sep 2 14:43:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11750843 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 18049138A for ; Wed, 2 Sep 2020 14:50:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E55FB2078E for ; Wed, 2 Sep 2020 14:50:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hgd8p2u2"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="yFBlBkyl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E55FB2078E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9Ydrcj7oF+hleM/g1NwodnryARG2pyvGZdZ62E1+NjQ=; b=hgd8p2u27ihpAWRgEZsRmM3By bO0c+ua4U79iNMRaZzL8d8hfaF2Fjd428muVdWa5U+/akHdlKdR11xAr85yWoE+2m1530+2Q2+ByZ JnZo3w+UXCRFjeRRgMhAf7Ua1XTyfNZrcKuxfh2DRwypc9sZhp6QT5jYhT4E5hkuBjJEkfqvw2U+B IuSMPCxbuhyMSDDLp2pR7C9KRhg1es+Q3tPJiVknWWAbZSHO+sLw1V3Kc0STEUB/YJv58+nEnO82H EDZui2gO9eI3l6D6hAA8ycwzMpQRVI/EeP3IrmdNtwiu+j8mC2GqFVUE7rSyNuXCXvwwcY59Joczh smWZ5P63A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDTzj-0000N7-7T; Wed, 02 Sep 2020 14:44:15 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDTzd-0000Lb-Gk for linux-arm-kernel@lists.infradead.org; Wed, 02 Sep 2020 14:44:10 +0000 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CE1EA207D3; Wed, 2 Sep 2020 14:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599057849; bh=RQyeMBvVYEEripIxkiwgkQx2PRZzYyZmQJQeA0zGmCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yFBlBkylysDA5Gjy5urP0SICWfH8AVxqvI6GX+AXUDd8IpE4KejLBKAn26gGLIQ1F NDmaCMReKZJM83VcSFXdS86Ww0BNsVQNvJ43si+T2k2UxS7umuaXERW+Sr+hIfKqMS KKSHClVO8CLCUchMTXOkXxKwspeB13acPmhCah5w= Received: by pali.im (Postfix) id 16C4CF3C; Wed, 2 Sep 2020 16:44:07 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Miquel Raynal , Kishon Vijay Abraham I , Vinod Koul , =?utf-8?q?Marek_Beh=C3=BAn?= , Tomasz Maciej Nowak Subject: [PATCH 2/2] PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware Date: Wed, 2 Sep 2020 16:43:44 +0200 Message-Id: <20200902144344.16684-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200902144344.16684-1-pali@kernel.org> References: <20200902144344.16684-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200902_104409_619523_D81A3A07 X-CRM114-Status: GOOD ( 16.28 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Old ATF automatically power on pcie phy and does not provide SMC call for phy power on functionality which leads to aardvark initialization failure: [ 0.330134] mvebu-a3700-comphy d0018300.phy: unsupported SMC call, try updating your firmware [ 0.338846] phy phy-d0018300.phy.1: phy poweron failed --> -95 [ 0.344753] advk-pcie d0070000.pcie: Failed to initialize PHY (-95) [ 0.351160] advk-pcie: probe of d0070000.pcie failed with error -95 This patch fixes above failure by ignoring 'not supported' error in aardvark driver. In this case it is expected that phy is already power on. Signed-off-by: Pali Rohár Fixes: 366697018c9a ("PCI: aardvark: Add PHY support") Reviewed-by: Rob Herring --- drivers/pci/controller/pci-aardvark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index c5d1bb3d52e4..e1a80c35c73d 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -1108,7 +1108,9 @@ static int advk_pcie_enable_phy(struct advk_pcie *pcie) } ret = phy_power_on(pcie->phy); - if (ret) { + if (ret == -EOPNOTSUPP) { + dev_warn(&pcie->pdev->dev, "PHY unsupported by firmware\n"); + } else if (ret) { phy_exit(pcie->phy); return ret; }