Skip to content

Commit a787945

Browse files
Mani-Sadhasivamkwilczynski
authored andcommitted
PCI: dwc: Add host_post_init() callback
This callback can be used by the platform drivers to do configuration once all the devices are scanned. Like changing LNKCTL of all downstream devices to enable ASPM etc... Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]>
1 parent 0bb80ec commit a787945

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
502502
if (ret)
503503
goto err_stop_link;
504504

505+
if (pp->ops->host_post_init)
506+
pp->ops->host_post_init(pp);
507+
505508
return 0;
506509

507510
err_stop_link:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ enum dw_pcie_ltssm {
301301
struct dw_pcie_host_ops {
302302
int (*host_init)(struct dw_pcie_rp *pp);
303303
void (*host_deinit)(struct dw_pcie_rp *pp);
304+
void (*host_post_init)(struct dw_pcie_rp *pp);
304305
int (*msi_host_init)(struct dw_pcie_rp *pp);
305306
void (*pme_turn_off)(struct dw_pcie_rp *pp);
306307
};

0 commit comments

Comments
 (0)