Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[deliverable/linux.git] / include / linux / pci-acpi.h
CommitLineData
1da177e4
LT
1/*
2 * File pci-acpi.h
3 *
4 * Copyright (C) 2004 Intel
5 * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com)
6 */
7
8#ifndef _PCI_ACPI_H_
9#define _PCI_ACPI_H_
10
8b62091e
AP
11#include <linux/acpi.h>
12
1da177e4 13#ifdef CONFIG_ACPI
b67ea761
RW
14extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev,
15 struct pci_bus *pci_bus);
16extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev);
17extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev,
18 struct pci_dev *pci_dev);
19extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev);
f4b57a3b 20extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle);
b67ea761 21
056c58e8
JS
22static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
23{
d18690af 24 struct pci_bus *pbus = pdev->bus;
059e4ba2 25
d18690af 26 /* Find a PCI root bus */
a222b8f8 27 while (!pci_is_root_bus(pbus))
d18690af 28 pbus = pbus->parent;
059e4ba2
YL
29
30 return DEVICE_ACPI_HANDLE(pbus->bridge);
056c58e8 31}
e8c331e9
KK
32
33static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
34{
059e4ba2
YL
35 struct device *dev;
36
37 if (pci_is_root_bus(pbus))
38 dev = pbus->bridge;
39 else
40 dev = &pbus->self->dev;
41
42 return DEVICE_ACPI_HANDLE(dev);
e8c331e9 43}
1da177e4
LT
44#endif
45
415e12b2
RW
46#ifdef CONFIG_ACPI_APEI
47extern bool aer_acpi_firmware_first(void);
48#else
49static inline bool aer_acpi_firmware_first(void) { return false; }
50#endif
51
1da177e4 52#endif /* _PCI_ACPI_H_ */
This page took 1.550061 seconds and 5 git commands to generate.