From: "Pali Rohár" <pali@kernel.org> To: "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>, "Rob Herring" <robh@kernel.org>, "Bjorn Helgaas" <bhelgaas@google.com>, "Miquel Raynal" <miquel.raynal@bootlin.com>, "Kishon Vijay Abraham I" <kishon@ti.com>, "Vinod Koul" <vkoul@kernel.org>, "Marek Behún" <marek.behun@nic.cz>, "Tomasz Maciej Nowak" <tmn505@gmail.com> Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware Date: Wed, 2 Sep 2020 16:43:44 +0200 [thread overview] Message-ID: <20200902144344.16684-3-pali@kernel.org> (raw) In-Reply-To: <20200902144344.16684-1-pali@kernel.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 <pali@kernel.org> Fixes: 366697018c9a ("PCI: aardvark: Add PHY support") --- 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; } -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: "Pali Rohár" <pali@kernel.org> To: "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>, "Rob Herring" <robh@kernel.org>, "Bjorn Helgaas" <bhelgaas@google.com>, "Miquel Raynal" <miquel.raynal@bootlin.com>, "Kishon Vijay Abraham I" <kishon@ti.com>, "Vinod Koul" <vkoul@kernel.org>, "Marek Behún" <marek.behun@nic.cz>, "Tomasz Maciej Nowak" <tmn505@gmail.com> Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware Date: Wed, 2 Sep 2020 16:43:44 +0200 [thread overview] Message-ID: <20200902144344.16684-3-pali@kernel.org> (raw) In-Reply-To: <20200902144344.16684-1-pali@kernel.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 <pali@kernel.org> Fixes: 366697018c9a ("PCI: aardvark: Add PHY support") --- 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; } -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-09-02 14:45 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-02 14:43 [PATCH 0/2] PCI: aardvark: Fix comphy with old ATF Pali Rohár 2020-09-02 14:43 ` Pali Rohár 2020-09-02 14:43 ` [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno Pali Rohár 2020-09-02 14:43 ` Pali Rohár 2020-09-02 16:13 ` Andrew Lunn 2020-09-02 16:13 ` Andrew Lunn 2020-09-02 16:56 ` Pali Rohár 2020-09-02 16:56 ` Pali Rohár 2020-09-02 17:00 ` Andrew Lunn 2020-09-02 17:00 ` Andrew Lunn 2020-09-02 17:05 ` Pali Rohár 2020-09-02 17:05 ` Pali Rohár 2020-09-02 17:20 ` Andrew Lunn 2020-09-02 17:20 ` Andrew Lunn 2020-09-02 17:45 ` Pali Rohár 2020-09-02 17:45 ` Pali Rohár 2020-09-30 18:17 ` Rob Herring 2020-09-30 18:17 ` Rob Herring 2020-09-02 14:43 ` Pali Rohár [this message] 2020-09-02 14:43 ` [PATCH 2/2] PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware Pali Rohár 2020-09-30 18:17 ` Rob Herring 2020-09-30 18:17 ` Rob Herring 2020-09-16 15:14 ` [PATCH 0/2] PCI: aardvark: Fix comphy with old ATF Tomasz Maciej Nowak 2020-09-16 15:14 ` Tomasz Maciej Nowak 2020-09-21 13:09 ` Pali Rohár 2020-09-21 13:09 ` Pali Rohár 2020-10-02 12:00 ` Pali Rohár 2020-10-02 12:00 ` Pali Rohár 2020-10-02 13:37 ` Lorenzo Pieralisi 2020-10-02 13:37 ` Lorenzo Pieralisi 2020-10-02 14:26 ` Pali Rohár 2020-10-02 14:26 ` Pali Rohár 2020-10-02 14:38 ` Lorenzo Pieralisi 2020-10-02 14:38 ` Lorenzo Pieralisi 2020-10-02 14:52 ` Pali Rohár 2020-10-02 14:52 ` Pali Rohár 2020-10-02 15:03 ` Lorenzo Pieralisi 2020-10-02 15:03 ` Lorenzo Pieralisi 2020-10-02 15:07 ` Pali Rohár 2020-10-02 15:07 ` Pali Rohár 2020-10-02 15:15 ` Lorenzo Pieralisi 2020-10-02 15:15 ` Lorenzo Pieralisi 2020-10-02 15:20 ` Pali Rohár 2020-10-02 15:20 ` Pali Rohár
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=20200902144344.16684-3-pali@kernel.org \ --to=pali@kernel.org \ --cc=bhelgaas@google.com \ --cc=kishon@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=marek.behun@nic.cz \ --cc=miquel.raynal@bootlin.com \ --cc=robh@kernel.org \ --cc=tmn505@gmail.com \ --cc=vkoul@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.