mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
PCI: dwc: Export APIs to support .remove() implementation
Export all configuration space access APIs and also other APIs to support host controller drivers of dwc core based implementations while adding support for .remove() hook to build their respective drivers as modules. 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:
parent
7bc082d7e9
commit
ca98329d3b
@ -311,6 +311,7 @@ void dw_pcie_msi_init(struct pcie_port *pp)
|
||||
dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_HI, 4,
|
||||
upper_32_bits(msi_target));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_msi_init);
|
||||
|
||||
int dw_pcie_host_init(struct pcie_port *pp)
|
||||
{
|
||||
@ -495,6 +496,7 @@ err_free_msi:
|
||||
dw_pcie_free_msi(pp);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_host_init);
|
||||
|
||||
void dw_pcie_host_deinit(struct pcie_port *pp)
|
||||
{
|
||||
@ -503,6 +505,7 @@ void dw_pcie_host_deinit(struct pcie_port *pp)
|
||||
if (pci_msi_enabled() && !pp->ops->msi_host_init)
|
||||
dw_pcie_free_msi(pp);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_host_deinit);
|
||||
|
||||
static int dw_pcie_access_other_conf(struct pcie_port *pp, struct pci_bus *bus,
|
||||
u32 devfn, int where, int size, u32 *val,
|
||||
@ -695,3 +698,4 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
|
||||
val |= PORT_LOGIC_SPEED_CHANGE;
|
||||
dw_pcie_wr_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, val);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_setup_rc);
|
||||
|
@ -34,6 +34,7 @@ int dw_pcie_read(void __iomem *addr, int size, u32 *val)
|
||||
|
||||
return PCIBIOS_SUCCESSFUL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_read);
|
||||
|
||||
int dw_pcie_write(void __iomem *addr, int size, u32 val)
|
||||
{
|
||||
@ -51,6 +52,7 @@ int dw_pcie_write(void __iomem *addr, int size, u32 val)
|
||||
|
||||
return PCIBIOS_SUCCESSFUL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_write);
|
||||
|
||||
u32 dw_pcie_read_dbi(struct dw_pcie *pci, u32 reg, size_t size)
|
||||
{
|
||||
@ -66,6 +68,7 @@ u32 dw_pcie_read_dbi(struct dw_pcie *pci, u32 reg, size_t size)
|
||||
|
||||
return val;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_read_dbi);
|
||||
|
||||
void dw_pcie_write_dbi(struct dw_pcie *pci, u32 reg, size_t size, u32 val)
|
||||
{
|
||||
@ -80,6 +83,7 @@ void dw_pcie_write_dbi(struct dw_pcie *pci, u32 reg, size_t size, u32 val)
|
||||
if (ret)
|
||||
dev_err(pci->dev, "Write DBI address failed\n");
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_pcie_write_dbi);
|
||||
|
||||
u32 dw_pcie_read_dbi2(struct dw_pcie *pci, u32 reg, size_t size)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user