Skip to content

Commit 604f8fd

Browse files
FROMLIST: PCI: dwc: Add host_start_link() & host_start_link() hooks for dwc glue drivers
Add host_start_link() and host_stop_link() functions to dwc glue drivers to register with start_link() and stop_link() of pci ops, allowing for better control over the link initialization and shutdown process. Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
1 parent 4f9fa57 commit 604f8fd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ struct dw_pcie_ops {
479479
enum dw_pcie_ltssm (*get_ltssm)(struct dw_pcie *pcie);
480480
int (*start_link)(struct dw_pcie *pcie);
481481
void (*stop_link)(struct dw_pcie *pcie);
482+
int (*host_start_link)(struct dw_pcie *pcie);
483+
void (*host_stop_link)(struct dw_pcie *pcie);
482484
};
483485

484486
struct debugfs_info {
@@ -738,6 +740,20 @@ static inline void dw_pcie_stop_link(struct dw_pcie *pci)
738740
pci->ops->stop_link(pci);
739741
}
740742

743+
static inline int dw_pcie_host_start_link(struct dw_pcie *pci)
744+
{
745+
if (pci->ops && pci->ops->host_start_link)
746+
return pci->ops->host_start_link(pci);
747+
748+
return 0;
749+
}
750+
751+
static inline void dw_pcie_host_stop_link(struct dw_pcie *pci)
752+
{
753+
if (pci->ops && pci->ops->host_stop_link)
754+
pci->ops->host_stop_link(pci);
755+
}
756+
741757
static inline enum dw_pcie_ltssm dw_pcie_get_ltssm(struct dw_pcie *pci)
742758
{
743759
u32 val;

0 commit comments

Comments
 (0)