Commit c5fcb29a authored by Gavin Shan's avatar Gavin Shan Committed by Michael Ellerman

powerpc/pci: Override pcibios_setup_bridge()

This overrides pcibios_setup_bridge() that is called to update PCI
bridge windows when PCI resource assignment is completed, to assign
PE and setup various (resource) mapping for the PE in subsequent
patches.
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d366d28c
...@@ -33,6 +33,8 @@ struct pci_controller_ops { ...@@ -33,6 +33,8 @@ struct pci_controller_ops {
/* Called during PCI resource reassignment */ /* Called during PCI resource reassignment */
resource_size_t (*window_alignment)(struct pci_bus *bus, resource_size_t (*window_alignment)(struct pci_bus *bus,
unsigned long type); unsigned long type);
void (*setup_bridge)(struct pci_bus *bus,
unsigned long type);
void (*reset_secondary_bus)(struct pci_dev *pdev); void (*reset_secondary_bus)(struct pci_dev *pdev);
#ifdef CONFIG_PCI_MSI #ifdef CONFIG_PCI_MSI
......
...@@ -124,6 +124,14 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus, ...@@ -124,6 +124,14 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus,
return 1; return 1;
} }
void pcibios_setup_bridge(struct pci_bus *bus, unsigned long type)
{
struct pci_controller *hose = pci_bus_to_host(bus);
if (hose->controller_ops.setup_bridge)
hose->controller_ops.setup_bridge(bus, type);
}
void pcibios_reset_secondary_bus(struct pci_dev *dev) void pcibios_reset_secondary_bus(struct pci_dev *dev)
{ {
struct pci_controller *phb = pci_bus_to_host(dev->bus); struct pci_controller *phb = pci_bus_to_host(dev->bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment