PCI: dwc: Add API support to de-initialize host
Add an API to group all the tasks to be done to de-initialize host which can then be called by any dwc core based driver implementations while adding .remove() support in their respective drivers. Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
This commit is contained in:

committed by
Lorenzo Pieralisi

parent
a188339ca5
commit
9d071cade3
@@ -496,6 +496,14 @@ err_free_msi:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void dw_pcie_host_deinit(struct pcie_port *pp)
|
||||
{
|
||||
pci_stop_root_bus(pp->root_bus);
|
||||
pci_remove_root_bus(pp->root_bus);
|
||||
if (pci_msi_enabled() && !pp->ops->msi_host_init)
|
||||
dw_pcie_free_msi(pp);
|
||||
}
|
||||
|
||||
static int dw_pcie_access_other_conf(struct pcie_port *pp, struct pci_bus *bus,
|
||||
u32 devfn, int where, int size, u32 *val,
|
||||
bool write)
|
||||
|
Reference in New Issue
Block a user