Commit 4ceca42d authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'remotes/lorenzo/pci/rcar'

- Fix aarch32 abort handler so it doesn't check the wrong bus clock before
  accessing the host controller (Marek Vasut)

* remotes/lorenzo/pci/rcar:
  PCI: rcar: Check if device is runtime suspended instead of __clk_is_enabled()
parents f0eb209f d2a14b54
...@@ -50,10 +50,10 @@ struct rcar_msi { ...@@ -50,10 +50,10 @@ struct rcar_msi {
*/ */
static void __iomem *pcie_base; static void __iomem *pcie_base;
/* /*
* Static copy of bus clock pointer, so we can check whether the clock * Static copy of PCIe device pointer, so we can check whether the
* is enabled or not. * device is runtime suspended or not.
*/ */
static struct clk *pcie_bus_clk; static struct device *pcie_dev;
#endif #endif
/* Structure representing the PCIe interface */ /* Structure representing the PCIe interface */
...@@ -792,7 +792,7 @@ static int rcar_pcie_get_resources(struct rcar_pcie_host *host) ...@@ -792,7 +792,7 @@ static int rcar_pcie_get_resources(struct rcar_pcie_host *host)
#ifdef CONFIG_ARM #ifdef CONFIG_ARM
/* Cache static copy for L1 link state fixup hook on aarch32 */ /* Cache static copy for L1 link state fixup hook on aarch32 */
pcie_base = pcie->base; pcie_base = pcie->base;
pcie_bus_clk = host->bus_clk; pcie_dev = pcie->dev;
#endif #endif
return 0; return 0;
...@@ -1062,7 +1062,7 @@ static int rcar_pcie_aarch32_abort_handler(unsigned long addr, ...@@ -1062,7 +1062,7 @@ static int rcar_pcie_aarch32_abort_handler(unsigned long addr,
spin_lock_irqsave(&pmsr_lock, flags); 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; ret = 1;
goto unlock_exit; goto unlock_exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment