diff options
author | Sinan Kaya <okaya@kernel.org> | 2018-12-19 17:46:55 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-12-20 04:19:49 -0500 |
commit | bd23fac3eaaa8bd79c02a2f139f68ac6424a9a7c (patch) | |
tree | 0d6bb37ba7cab45d908b43721ba4041ea4d14e90 | |
parent | 86689776878f0c1aee77604b9c5fce2ffb9ec65e (diff) |
ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset
Allow ACPI to be built without PCI support in place.
Signed-off-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/Makefile | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/achware.h | 9 | ||||
-rw-r--r-- | drivers/acpi/acpica/evhandler.c | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/exregion.c | 4 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 2 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 4 |
6 files changed, 24 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index b14621da5413..59700433a96e 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile | |||
@@ -77,13 +77,13 @@ acpi-y += \ | |||
77 | hwacpi.o \ | 77 | hwacpi.o \ |
78 | hwesleep.o \ | 78 | hwesleep.o \ |
79 | hwgpe.o \ | 79 | hwgpe.o \ |
80 | hwpci.o \ | ||
81 | hwregs.o \ | 80 | hwregs.o \ |
82 | hwsleep.o \ | 81 | hwsleep.o \ |
83 | hwvalid.o \ | 82 | hwvalid.o \ |
84 | hwxface.o \ | 83 | hwxface.o \ |
85 | hwxfsleep.o | 84 | hwxfsleep.o |
86 | 85 | ||
86 | acpi-$(CONFIG_PCI) += hwpci.o | ||
87 | acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o | 87 | acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o |
88 | 88 | ||
89 | acpi-y += \ | 89 | acpi-y += \ |
diff --git a/drivers/acpi/acpica/achware.h b/drivers/acpi/acpica/achware.h index 43ce67a9da1f..ef99e2fc37f8 100644 --- a/drivers/acpi/acpica/achware.h +++ b/drivers/acpi/acpica/achware.h | |||
@@ -106,11 +106,20 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
106 | struct acpi_gpe_block_info *gpe_block, | 106 | struct acpi_gpe_block_info *gpe_block, |
107 | void *context); | 107 | void *context); |
108 | 108 | ||
109 | #ifdef ACPI_PCI_CONFIGURED | ||
109 | /* | 110 | /* |
110 | * hwpci - PCI configuration support | 111 | * hwpci - PCI configuration support |
111 | */ | 112 | */ |
112 | acpi_status | 113 | acpi_status |
113 | acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id, | 114 | acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id, |
114 | acpi_handle root_pci_device, acpi_handle pci_region); | 115 | acpi_handle root_pci_device, acpi_handle pci_region); |
116 | #else | ||
117 | static inline acpi_status | ||
118 | acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id, acpi_handle root_pci_device, | ||
119 | acpi_handle pci_region) | ||
120 | { | ||
121 | return AE_SUPPORT; | ||
122 | } | ||
123 | #endif | ||
115 | 124 | ||
116 | #endif /* __ACHWARE_H__ */ | 125 | #endif /* __ACHWARE_H__ */ |
diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c index d319ee33d040..4ed1e67db6be 100644 --- a/drivers/acpi/acpica/evhandler.c +++ b/drivers/acpi/acpica/evhandler.c | |||
@@ -364,25 +364,25 @@ acpi_ev_install_space_handler(struct acpi_namespace_node *node, | |||
364 | handler = acpi_ex_system_io_space_handler; | 364 | handler = acpi_ex_system_io_space_handler; |
365 | setup = acpi_ev_io_space_region_setup; | 365 | setup = acpi_ev_io_space_region_setup; |
366 | break; | 366 | break; |
367 | 367 | #ifdef ACPI_PCI_CONFIGURED | |
368 | case ACPI_ADR_SPACE_PCI_CONFIG: | 368 | case ACPI_ADR_SPACE_PCI_CONFIG: |
369 | 369 | ||
370 | handler = acpi_ex_pci_config_space_handler; | 370 | handler = acpi_ex_pci_config_space_handler; |
371 | setup = acpi_ev_pci_config_region_setup; | 371 | setup = acpi_ev_pci_config_region_setup; |
372 | break; | 372 | break; |
373 | 373 | #endif | |
374 | case ACPI_ADR_SPACE_CMOS: | 374 | case ACPI_ADR_SPACE_CMOS: |
375 | 375 | ||
376 | handler = acpi_ex_cmos_space_handler; | 376 | handler = acpi_ex_cmos_space_handler; |
377 | setup = acpi_ev_cmos_region_setup; | 377 | setup = acpi_ev_cmos_region_setup; |
378 | break; | 378 | break; |
379 | 379 | #ifdef ACPI_PCI_CONFIGURED | |
380 | case ACPI_ADR_SPACE_PCI_BAR_TARGET: | 380 | case ACPI_ADR_SPACE_PCI_BAR_TARGET: |
381 | 381 | ||
382 | handler = acpi_ex_pci_bar_space_handler; | 382 | handler = acpi_ex_pci_bar_space_handler; |
383 | setup = acpi_ev_pci_bar_region_setup; | 383 | setup = acpi_ev_pci_bar_region_setup; |
384 | break; | 384 | break; |
385 | 385 | #endif | |
386 | case ACPI_ADR_SPACE_DATA_TABLE: | 386 | case ACPI_ADR_SPACE_DATA_TABLE: |
387 | 387 | ||
388 | handler = acpi_ex_data_table_space_handler; | 388 | handler = acpi_ex_data_table_space_handler; |
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c index 97bbfd07fcf7..2c58f5e00b1a 100644 --- a/drivers/acpi/acpica/exregion.c +++ b/drivers/acpi/acpica/exregion.c | |||
@@ -311,6 +311,7 @@ acpi_ex_system_io_space_handler(u32 function, | |||
311 | return_ACPI_STATUS(status); | 311 | return_ACPI_STATUS(status); |
312 | } | 312 | } |
313 | 313 | ||
314 | #ifdef ACPI_PCI_CONFIGURED | ||
314 | /******************************************************************************* | 315 | /******************************************************************************* |
315 | * | 316 | * |
316 | * FUNCTION: acpi_ex_pci_config_space_handler | 317 | * FUNCTION: acpi_ex_pci_config_space_handler |
@@ -387,6 +388,7 @@ acpi_ex_pci_config_space_handler(u32 function, | |||
387 | 388 | ||
388 | return_ACPI_STATUS(status); | 389 | return_ACPI_STATUS(status); |
389 | } | 390 | } |
391 | #endif | ||
390 | 392 | ||
391 | /******************************************************************************* | 393 | /******************************************************************************* |
392 | * | 394 | * |
@@ -420,6 +422,7 @@ acpi_ex_cmos_space_handler(u32 function, | |||
420 | return_ACPI_STATUS(status); | 422 | return_ACPI_STATUS(status); |
421 | } | 423 | } |
422 | 424 | ||
425 | #ifdef ACPI_PCI_CONFIGURED | ||
423 | /******************************************************************************* | 426 | /******************************************************************************* |
424 | * | 427 | * |
425 | * FUNCTION: acpi_ex_pci_bar_space_handler | 428 | * FUNCTION: acpi_ex_pci_bar_space_handler |
@@ -451,6 +454,7 @@ acpi_ex_pci_bar_space_handler(u32 function, | |||
451 | 454 | ||
452 | return_ACPI_STATUS(status); | 455 | return_ACPI_STATUS(status); |
453 | } | 456 | } |
457 | #endif | ||
454 | 458 | ||
455 | /******************************************************************************* | 459 | /******************************************************************************* |
456 | * | 460 | * |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index b48874b8e1ea..f29e427d0d1d 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -769,6 +769,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u64 value, u32 width) | |||
769 | return AE_OK; | 769 | return AE_OK; |
770 | } | 770 | } |
771 | 771 | ||
772 | #ifdef CONFIG_PCI | ||
772 | acpi_status | 773 | acpi_status |
773 | acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, | 774 | acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, |
774 | u64 *value, u32 width) | 775 | u64 *value, u32 width) |
@@ -827,6 +828,7 @@ acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, | |||
827 | 828 | ||
828 | return (result ? AE_ERROR : AE_OK); | 829 | return (result ? AE_ERROR : AE_OK); |
829 | } | 830 | } |
831 | #endif | ||
830 | 832 | ||
831 | static void acpi_os_execute_deferred(struct work_struct *work) | 833 | static void acpi_os_execute_deferred(struct work_struct *work) |
832 | { | 834 | { |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 7451b3bca83a..e3d21d014fcc 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -33,6 +33,10 @@ | |||
33 | 33 | ||
34 | /* Kernel specific ACPICA configuration */ | 34 | /* Kernel specific ACPICA configuration */ |
35 | 35 | ||
36 | #ifdef CONFIG_PCI | ||
37 | #define ACPI_PCI_CONFIGURED | ||
38 | #endif | ||
39 | |||
36 | #ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY | 40 | #ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY |
37 | #define ACPI_REDUCED_HARDWARE 1 | 41 | #define ACPI_REDUCED_HARDWARE 1 |
38 | #endif | 42 | #endif |