Skip to content

Commit 28ce835

Browse files
FROMLIST: PCI: Add new start_link() & stop_link function ops
First controller driver probes, enables link training and scans the bus. When the PCI bridge is found, its child DT nodes will be scanned and pwrctrl devices will be created if needed. By the time pwrctrl driver probe gets called link training is already enabled by controller driver. Certain devices like TC956x which uses PCI pwrctl framework needs to configure the device before PCI link is up. As the controller driver already enables link training as part of its probe, the moment device is powered on, controller and device participates in the link training and link can come up immediately and maynot have time to configure the device. So we need to stop the link training by using stop_link() and enable them back after device is configured by using start_link(). Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
1 parent 05a8da5 commit 28ce835

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/pci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@ struct pci_ops {
807807
void __iomem *(*map_bus)(struct pci_bus *bus, unsigned int devfn, int where);
808808
int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val);
809809
int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val);
810+
int (*start_link)(struct pci_bus *bus);
811+
void (*stop_link)(struct pci_bus *bus);
810812
};
811813

812814
/*

0 commit comments

Comments
 (0)