Skip to content

Commit df237d9

Browse files
FROMLIST: PCI: dwc: Implement .start_link(), .stop_link() hooks
Implement stop_link() and start_link() function op for dwc drivers. Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
1 parent e17291c commit df237d9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/pci/controller/dwc/pcie-designware-host.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,10 +727,28 @@ void __iomem *dw_pcie_own_conf_map_bus(struct pci_bus *bus, unsigned int devfn,
727727
}
728728
EXPORT_SYMBOL_GPL(dw_pcie_own_conf_map_bus);
729729

730+
static int dw_pcie_op_start_link(struct pci_bus *bus)
731+
{
732+
struct dw_pcie_rp *pp = bus->sysdata;
733+
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
734+
735+
return dw_pcie_host_start_link(pci);
736+
}
737+
738+
static void dw_pcie_op_stop_link(struct pci_bus *bus)
739+
{
740+
struct dw_pcie_rp *pp = bus->sysdata;
741+
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
742+
743+
dw_pcie_host_stop_link(pci);
744+
}
745+
730746
static struct pci_ops dw_pcie_ops = {
731747
.map_bus = dw_pcie_own_conf_map_bus,
732748
.read = pci_generic_config_read,
733749
.write = pci_generic_config_write,
750+
.start_link = dw_pcie_op_start_link,
751+
.stop_link = dw_pcie_op_stop_link,
734752
};
735753

736754
static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp)

0 commit comments

Comments
 (0)