Skip to content

Commit ec57335

Browse files
committed
PCI: dwc: Add dw_pcie_suspend_noirq(), dw_pcie_resume_noirq() stubs for !CONFIG_PCIE_DW_HOST
Previously pcie-designware.h declared dw_pcie_suspend_noirq() and dw_pcie_resume_noirq() unconditionally, even though they were only implemented when CONFIG_PCIE_DW_HOST was defined. Add no-op stubs for them when CONFIG_PCIE_DW_HOST is not defined so drivers that support both Root Complex and Endpoint modes don't need Link: https://lore.kernel.org/r/20250117213810.GA656803@bhelgaas Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 112aba9 commit ec57335

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

drivers/pci/controller/dwc/pcie-designware.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,6 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci);
500500
int dw_pcie_edma_detect(struct dw_pcie *pci);
501501
void dw_pcie_edma_remove(struct dw_pcie *pci);
502502

503-
int dw_pcie_suspend_noirq(struct dw_pcie *pci);
504-
int dw_pcie_resume_noirq(struct dw_pcie *pci);
505-
506503
static inline void dw_pcie_writel_dbi(struct dw_pcie *pci, u32 reg, u32 val)
507504
{
508505
dw_pcie_write_dbi(pci, reg, 0x4, val);
@@ -680,6 +677,8 @@ static inline enum dw_pcie_ltssm dw_pcie_get_ltssm(struct dw_pcie *pci)
680677
}
681678

682679
#ifdef CONFIG_PCIE_DW_HOST
680+
int dw_pcie_suspend_noirq(struct dw_pcie *pci);
681+
int dw_pcie_resume_noirq(struct dw_pcie *pci);
683682
irqreturn_t dw_handle_msi_irq(struct dw_pcie_rp *pp);
684683
int dw_pcie_setup_rc(struct dw_pcie_rp *pp);
685684
int dw_pcie_host_init(struct dw_pcie_rp *pp);
@@ -688,6 +687,16 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp);
688687
void __iomem *dw_pcie_own_conf_map_bus(struct pci_bus *bus, unsigned int devfn,
689688
int where);
690689
#else
690+
static inline int dw_pcie_suspend_noirq(struct dw_pcie *pci)
691+
{
692+
return 0;
693+
}
694+
695+
static inline int dw_pcie_resume_noirq(struct dw_pcie *pci)
696+
{
697+
return 0;
698+
}
699+
691700
static inline irqreturn_t dw_handle_msi_irq(struct dw_pcie_rp *pp)
692701
{
693702
return IRQ_NONE;

0 commit comments

Comments
 (0)