* [PATCH] PCI: imx6: Don't request "pci_aux" clock on i.MX7
@ 2019-03-01 8:55 Andrey Smirnov
2019-03-01 11:32 ` Lorenzo Pieralisi
2019-03-01 19:36 ` Trent Piepho
0 siblings, 2 replies; 3+ messages in thread
From: Andrey Smirnov @ 2019-03-01 8:55 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: Andrey Smirnov, Trent Piepho, Bjorn Helgaas, Chris Healy,
Lucas Stach, linux-imx, linux-kernel, linux-pci
The clock in question is not present on i.MX7, so move the code
requesting it into i.MX8MQ-only path.
Fixes: eeb61c4e8530 ("PCI: imx6: Add code to request/control
"pcie_aux" clock for i.MX8MQ")
Reported-by: Trent Piepho <tpiepho@impinj.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Trent Piepho <tpiepho@impinj.com>
Cc: linux-imx@nxp.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-pci@vger.kernel.org
---
drivers/pci/controller/dwc/pci-imx6.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 08f1ee050c73..5fe364a9959d 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1100,8 +1100,14 @@ static int imx6_pcie_probe(struct platform_device *pdev)
return PTR_ERR(imx6_pcie->pcie_inbound_axi);
}
break;
- case IMX7D:
case IMX8MQ:
+ imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux");
+ if (IS_ERR(imx6_pcie->pcie_aux)) {
+ dev_err(dev, "pcie_aux clock source missing or invalid\n");
+ return PTR_ERR(imx6_pcie->pcie_aux);
+ }
+ /* fall through */
+ case IMX7D:
if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
imx6_pcie->controller_id = 1;
@@ -1118,12 +1124,6 @@ static int imx6_pcie_probe(struct platform_device *pdev)
dev_err(dev, "Failed to get PCIE APPS reset control\n");
return PTR_ERR(imx6_pcie->apps_reset);
}
-
- imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux");
- if (IS_ERR(imx6_pcie->pcie_aux)) {
- dev_err(dev, "pcie_aux clock source missing or invalid\n");
- return PTR_ERR(imx6_pcie->pcie_aux);
- }
break;
default:
break;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: imx6: Don't request "pci_aux" clock on i.MX7
2019-03-01 8:55 [PATCH] PCI: imx6: Don't request "pci_aux" clock on i.MX7 Andrey Smirnov
@ 2019-03-01 11:32 ` Lorenzo Pieralisi
2019-03-01 19:36 ` Trent Piepho
1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2019-03-01 11:32 UTC (permalink / raw)
To: Andrey Smirnov
Cc: Trent Piepho, Bjorn Helgaas, Chris Healy, Lucas Stach, linux-imx,
linux-kernel, linux-pci
On Fri, Mar 01, 2019 at 12:55:59AM -0800, Andrey Smirnov wrote:
> The clock in question is not present on i.MX7, so move the code
> requesting it into i.MX8MQ-only path.
>
> Fixes: eeb61c4e8530 ("PCI: imx6: Add code to request/control
> "pcie_aux" clock for i.MX8MQ")
> Reported-by: Trent Piepho <tpiepho@impinj.com>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Chris Healy <cphealy@gmail.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Trent Piepho <tpiepho@impinj.com>
> Cc: linux-imx@nxp.com
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
I have squashed this patch in the commit it fixes, pci/dwc
branch, please have a look.
Thanks,
Lorenzo
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 08f1ee050c73..5fe364a9959d 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1100,8 +1100,14 @@ static int imx6_pcie_probe(struct platform_device *pdev)
> return PTR_ERR(imx6_pcie->pcie_inbound_axi);
> }
> break;
> - case IMX7D:
> case IMX8MQ:
> + imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux");
> + if (IS_ERR(imx6_pcie->pcie_aux)) {
> + dev_err(dev, "pcie_aux clock source missing or invalid\n");
> + return PTR_ERR(imx6_pcie->pcie_aux);
> + }
> + /* fall through */
> + case IMX7D:
> if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
> imx6_pcie->controller_id = 1;
>
> @@ -1118,12 +1124,6 @@ static int imx6_pcie_probe(struct platform_device *pdev)
> dev_err(dev, "Failed to get PCIE APPS reset control\n");
> return PTR_ERR(imx6_pcie->apps_reset);
> }
> -
> - imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux");
> - if (IS_ERR(imx6_pcie->pcie_aux)) {
> - dev_err(dev, "pcie_aux clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_aux);
> - }
> break;
> default:
> break;
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: imx6: Don't request "pci_aux" clock on i.MX7
2019-03-01 8:55 [PATCH] PCI: imx6: Don't request "pci_aux" clock on i.MX7 Andrey Smirnov
2019-03-01 11:32 ` Lorenzo Pieralisi
@ 2019-03-01 19:36 ` Trent Piepho
1 sibling, 0 replies; 3+ messages in thread
From: Trent Piepho @ 2019-03-01 19:36 UTC (permalink / raw)
To: andrew.smirnov, lorenzo.pieralisi
Cc: l.stach, linux-kernel, linux-pci, linux-imx, bhelgaas, cphealy
On Fri, 2019-03-01 at 00:55 -0800, Andrey Smirnov wrote:
> The clock in question is not present on i.MX7, so move the code
> requesting it into i.MX8MQ-only path.
>
> Fixes: eeb61c4e8530 ("PCI: imx6: Add code to request/control
> "pcie_aux" clock for i.MX8MQ")
> Reported-by: Trent Piepho <tpiepho@impinj.com>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Chris Healy <cphealy@gmail.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Trent Piepho <tpiepho@impinj.com>
> Cc: linux-imx@nxp.com
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
Tested on linux-next, imx7d PCI-e appears to be working fine now.
It's too bad git diff can't report the case label(s) code falls under
the same way it can (usually) get the function name. I saw the
original commit when it was posted and didn't notice anything myself
either.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-01 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 8:55 [PATCH] PCI: imx6: Don't request "pci_aux" clock on i.MX7 Andrey Smirnov
2019-03-01 11:32 ` Lorenzo Pieralisi
2019-03-01 19:36 ` Trent Piepho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).