linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: imx6: Add CONFIG_PCIE_DW_HOST check for suspend/resume
@ 2025-01-17 18:07 Frank Li
  2025-01-17 21:38 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Li @ 2025-01-17 18:07 UTC (permalink / raw)
  To: Richard Zhu, Lucas Stach, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
	Bjorn Helgaas, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, open list:PCI DRIVER FOR IMX6,
	moderated list:PCI DRIVER FOR IMX6, open list:PCI DRIVER FOR IMX6,
	open list
  Cc: imx

Add CONFIG_PCIE_DW_HOST check for suspend/resume to avoid build issue
when CONFIG_PCIE_DW_HOST is not defined but CONFIG_PCIE_DW_EP defined.

Only host support suspend/resume at i.MX chips.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501171751.YzEFidaE-lkp@intel.com/
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/pci/controller/dwc/pci-imx6.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 129604025252d..e9fdf35d24821 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1390,7 +1390,8 @@ static int imx_pcie_suspend_noirq(struct device *dev)
 {
 	struct imx_pcie *imx_pcie = dev_get_drvdata(dev);
 
-	if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND))
+	if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND) ||
+	    !IS_ENABLED(CONFIG_PCIE_DW_HOST))
 		return 0;
 
 	imx_pcie_msi_save_restore(imx_pcie, true);
@@ -1414,7 +1415,8 @@ static int imx_pcie_resume_noirq(struct device *dev)
 	int ret;
 	struct imx_pcie *imx_pcie = dev_get_drvdata(dev);
 
-	if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND))
+	if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND) ||
+	    !IS_ENABLED(CONFIG_PCIE_DW_HOST))
 		return 0;
 
 	if (imx_check_flag(imx_pcie, IMX_PCIE_FLAG_BROKEN_SUSPEND)) {
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-17 21:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 18:07 [PATCH 1/1] PCI: imx6: Add CONFIG_PCIE_DW_HOST check for suspend/resume Frank Li
2025-01-17 21:38 ` Bjorn Helgaas
2025-01-17 21:44   ` Frank Li

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).