[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220124184151.639481546@linuxfoundation.org>
Date: Mon, 24 Jan 2022 19:42:53 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Marek Vasut <marek.vasut+renesas@...il.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Randy Dunlap <rdunlap@...radead.org>,
Arnd Bergmann <arnd@...db.de>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Stephen Boyd <sboyd@...nel.org>,
Wolfram Sang <wsa@...-dreams.de>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
linux-renesas-soc@...r.kernel.org, Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.16 0784/1039] PCI: rcar: Check if device is runtime suspended instead of __clk_is_enabled()
From: Marek Vasut <marek.vasut+renesas@...il.com>
[ Upstream commit d2a14b54989e9ccea8401895fdfbc213bd1f56af ]
Replace __clk_is_enabled() with pm_runtime_suspended(),
as __clk_is_enabled() was checking the wrong bus clock
and caused the following build error too:
arm-linux-gnueabi-ld: drivers/pci/controller/pcie-rcar-host.o: in function `rcar_pcie_aarch32_abort_handler':
pcie-rcar-host.c:(.text+0xdd0): undefined reference to `__clk_is_enabled'
Link: https://lore.kernel.org/r/20211115204641.12941-1-marek.vasut@gmail.com
Fixes: a115b1bd3af0 ("PCI: rcar: Add L1 link state fix into data abort hook")
Signed-off-by: Marek Vasut <marek.vasut+renesas@...il.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Acked-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc: Stephen Boyd <sboyd@...nel.org>
Cc: Wolfram Sang <wsa@...-dreams.de>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Cc: linux-renesas-soc@...r.kernel.org
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/pci/controller/pcie-rcar-host.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
index e12c2d8be05a3..780e60159993c 100644
--- a/drivers/pci/controller/pcie-rcar-host.c
+++ b/drivers/pci/controller/pcie-rcar-host.c
@@ -50,10 +50,10 @@ struct rcar_msi {
*/
static void __iomem *pcie_base;
/*
- * Static copy of bus clock pointer, so we can check whether the clock
- * is enabled or not.
+ * Static copy of PCIe device pointer, so we can check whether the
+ * device is runtime suspended or not.
*/
-static struct clk *pcie_bus_clk;
+static struct device *pcie_dev;
#endif
/* Structure representing the PCIe interface */
@@ -792,7 +792,7 @@ static int rcar_pcie_get_resources(struct rcar_pcie_host *host)
#ifdef CONFIG_ARM
/* Cache static copy for L1 link state fixup hook on aarch32 */
pcie_base = pcie->base;
- pcie_bus_clk = host->bus_clk;
+ pcie_dev = pcie->dev;
#endif
return 0;
@@ -1062,7 +1062,7 @@ static int rcar_pcie_aarch32_abort_handler(unsigned long addr,
spin_lock_irqsave(&pmsr_lock, flags);
- if (!pcie_base || !__clk_is_enabled(pcie_bus_clk)) {
+ if (!pcie_base || pm_runtime_suspended(pcie_dev)) {
ret = 1;
goto unlock_exit;
}
--
2.34.1
Powered by blists - more mailing lists