[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250117180722.2354290-1-Frank.Li@nxp.com>
Date: Fri, 17 Jan 2025 13:07:22 -0500
From: Frank Li <Frank.Li@....com>
To: Richard Zhu <hongxing.zhu@....com>,
Lucas Stach <l.stach@...gutronix.de>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
linux-pci@...r.kernel.org (open list:PCI DRIVER FOR IMX6),
linux-arm-kernel@...ts.infradead.org (moderated list:PCI DRIVER FOR IMX6),
imx@...ts.linux.dev (open list:PCI DRIVER FOR IMX6),
linux-kernel@...r.kernel.org (open list)
Cc: imx@...ts.linux.dev
Subject: [PATCH 1/1] PCI: imx6: Add CONFIG_PCIE_DW_HOST check for suspend/resume
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@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501171751.YzEFidaE-lkp@intel.com/
Signed-off-by: Frank Li <Frank.Li@....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
Powered by blists - more mailing lists