mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
PCI/ACPI: Add interface acpi_pci_root_create()
Introduce common interface acpi_pci_root_create() and related data structures to create PCI root bus for ACPI PCI host bridges. It will be used to kill duplicated arch specific code for IA64 and x86. It may also help ARM64 in future. Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
3f7abdefc0
commit
2c204383a2
2 changed files with 228 additions and 0 deletions
|
@ -52,6 +52,30 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
|
|||
return ACPI_HANDLE(dev);
|
||||
}
|
||||
|
||||
struct acpi_pci_root;
|
||||
struct acpi_pci_root_ops;
|
||||
|
||||
struct acpi_pci_root_info {
|
||||
struct acpi_pci_root *root;
|
||||
struct acpi_device *bridge;
|
||||
struct acpi_pci_root_ops *ops;
|
||||
struct list_head resources;
|
||||
char name[16];
|
||||
};
|
||||
|
||||
struct acpi_pci_root_ops {
|
||||
struct pci_ops *pci_ops;
|
||||
int (*init_info)(struct acpi_pci_root_info *info);
|
||||
void (*release_info)(struct acpi_pci_root_info *info);
|
||||
int (*prepare_resources)(struct acpi_pci_root_info *info);
|
||||
};
|
||||
|
||||
extern int acpi_pci_probe_root_resources(struct acpi_pci_root_info *info);
|
||||
extern struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
|
||||
struct acpi_pci_root_ops *ops,
|
||||
struct acpi_pci_root_info *info,
|
||||
void *sd);
|
||||
|
||||
void acpi_pci_add_bus(struct pci_bus *bus);
|
||||
void acpi_pci_remove_bus(struct pci_bus *bus);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue