summaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorGabriele Paoloni <gabriele.paoloni@huawei.com>2015-11-11 09:12:25 +0800
committerBjorn Helgaas <bhelgaas@google.com>2015-11-25 13:23:38 -0600
commit7c7a0e945349a3d0d497d7f32db6ed33d4031110 (patch)
tree3f4fb05f3119cec239ba391cecf8ccd7a8b5df0a /include/linux/pci.h
parent9f55cf5654fff70de8675ea128b53281edc794d3 (diff)
downloadlinux-7c7a0e945349a3d0d497d7f32db6ed33d4031110.tar.gz
linux-7c7a0e945349a3d0d497d7f32db6ed33d4031110.tar.bz2
linux-7c7a0e945349a3d0d497d7f32db6ed33d4031110.zip
ARM/PCI: Move align_resource function pointer to pci_host_bridge structure
Commit b3a72384fe29 ("ARM/PCI: Replace pci_sys_data->align_resource with global function pointer") introduced an ARM-specific align_resource() function pointer. This is not portable to other arches and doesn't work for platforms with two different PCIe host bridge controllers. Move the function pointer to the pci_host_bridge structure so each host bridge driver can specify its own align_resource() function. Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e828e7b4afec..6ae25aae88fd 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -412,9 +412,18 @@ struct pci_host_bridge {
void (*release_fn)(struct pci_host_bridge *);
void *release_data;
unsigned int ignore_reset_delay:1; /* for entire hierarchy */
+ /* Resource alignment requirements */
+ resource_size_t (*align_resource)(struct pci_dev *dev,
+ const struct resource *res,
+ resource_size_t start,
+ resource_size_t size,
+ resource_size_t align);
};
#define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev)
+
+struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus);
+
void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
void (*release_fn)(struct pci_host_bridge *),
void *release_data);