Skip to content

Commit 4f9fa57

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 401900d commit 4f9fa57

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
@@ -828,6 +828,8 @@ struct pci_ops {
828828
void __iomem *(*map_bus)(struct pci_bus *bus, unsigned int devfn, int where);
829829
int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val);
830830
int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val);
831+
int (*start_link)(struct pci_bus *bus);
832+
void (*stop_link)(struct pci_bus *bus);
831833
};
832834

833835
/*

0 commit comments

Comments
 (0)