Skip to content

Commit 063c938

Browse files
thom24kwilczynski
authored andcommitted
PCI: cadence: Set cdns_pcie_host_init() global
During the resume sequence of the host, cdns_pcie_host_init() needs to be called, so set it global. The dev function parameter is removed, as it isn't used. Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Thomas Richard <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Siddharth Vadapalli <[email protected]>
1 parent d1b6f2e commit 063c938

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

drivers/pci/controller/cadence/pcie-cadence-host.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc)
485485
return cdns_pcie_host_map_dma_ranges(rc);
486486
}
487487

488-
static int cdns_pcie_host_init(struct device *dev,
489-
struct cdns_pcie_rc *rc)
488+
int cdns_pcie_host_init(struct cdns_pcie_rc *rc)
490489
{
491490
int err;
492491

@@ -564,7 +563,7 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc)
564563
for (bar = RP_BAR0; bar <= RP_NO_BAR; bar++)
565564
rc->avail_ib_bar[bar] = true;
566565

567-
ret = cdns_pcie_host_init(dev, rc);
566+
ret = cdns_pcie_host_init(rc);
568567
if (ret)
569568
return ret;
570569

drivers/pci/controller/cadence/pcie-cadence.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ static inline bool cdns_pcie_link_up(struct cdns_pcie *pcie)
522522

523523
#ifdef CONFIG_PCIE_CADENCE_HOST
524524
int cdns_pcie_host_link_setup(struct cdns_pcie_rc *rc);
525+
int cdns_pcie_host_init(struct cdns_pcie_rc *rc);
525526
int cdns_pcie_host_setup(struct cdns_pcie_rc *rc);
526527
void __iomem *cdns_pci_map_bus(struct pci_bus *bus, unsigned int devfn,
527528
int where);
@@ -531,6 +532,11 @@ static inline int cdns_pcie_host_link_setup(struct cdns_pcie_rc *rc)
531532
return 0;
532533
}
533534

535+
static inline int cdns_pcie_host_init(struct cdns_pcie_rc *rc)
536+
{
537+
return 0;
538+
}
539+
534540
static inline int cdns_pcie_host_setup(struct cdns_pcie_rc *rc)
535541
{
536542
return 0;

0 commit comments

Comments
 (0)