aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Stone <al.stone@linaro.org>2013-11-22 15:13:09 -0700
committerGraeme Gregory <graeme.gregory@linaro.org>2013-11-26 12:19:56 +0000
commitbe7059a8d22cba31b071ebe75ddc0d8b224d12dc (patch)
tree1009bcb3f8430970d7ff8932134ffa90689ced29
parent1143fd18461b3a363cb7866892b3ad4345ba4c53 (diff)
downloadleg-kernel-be7059a8d22cba31b071ebe75ddc0d8b224d12dc.tar.gz
ACPI: ARM: make use of an ACPI blob address in FDT /chosen configurable.
Since this is really only a option to be used during kernel development, add the kernel config item ACPI_USE_CHOSEN_NODE to allow a developer access to this when working on a non-UEFI system or if needed to experiment with ACPI table content during driver development. Signed-off-by: Al Stone <al.stone@linaro.org>
-rw-r--r--arch/arm/Kconfig.debug11
-rw-r--r--arch/arm64/Kconfig.debug11
-rw-r--r--drivers/acpi/osl.c10
3 files changed, 28 insertions, 4 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0e23bb668a49..6ef3d7c074b6 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1132,4 +1132,15 @@ config PID_IN_CONTEXTIDR
additional instructions during context switch. Say Y here only if you
are planning to use hardware trace tools with this kernel.
+config ACPI_USE_CHOSEN_NODE
+ bool "Pass ACPI blob address through /chosen node"
+ depends on ARM || ARM64
+ help
+ Enabling this allows one to experiment with ACPI tables during
+ development on non-UEFI systems. If this is enabled, ACPI will
+ expect to find /chosen/linux,acpi-start in an FDT passed into
+ the kernel and use the contents of that node as the physical
+ address of the RSDP in an ACPI table blob.
+
+
endmenu
diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
index 835c559786bd..483dcce0edf0 100644
--- a/arch/arm64/Kconfig.debug
+++ b/arch/arm64/Kconfig.debug
@@ -23,4 +23,15 @@ config PID_IN_CONTEXTIDR
instructions during context switch. Say Y here only if you are
planning to use hardware trace tools with this kernel.
+config ACPI_USE_CHOSEN_NODE
+ bool "Pass ACPI blob address through /chosen node"
+ depends on ARM || ARM64
+ help
+ Enabling this allows one to experiment with ACPI tables during
+ development on non-UEFI systems. If this is enabled, ACPI will
+ expect to find /chosen/linux,acpi-start in an FDT passed into
+ the kernel and use the contents of that node as the physical
+ address of the RSDP in an ACPI table blob.
+
+
endmenu
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 091206631b3d..a9b5b110469d 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -251,13 +251,15 @@ static int __init setup_acpi_rsdp(char *arg)
early_param("acpi_rsdp", setup_acpi_rsdp);
#endif
-#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
+#ifdef CONFIG_ACPI_USE_CHOSEN_NODE
#include <asm/acpi.h>
#include <acpi/actbl.h>
void acpi_find_arm_root_pointer(acpi_physical_address *pa)
{
- /* BOZO: temporarily clunky.
+ /* This function is for development use only, or in extreme
+ * cases where UEFI is not yet available for the platform.
+ *
* What we do is, while using u-boot still, is use the values
* that have already been retrieved from the FDT node
* (/chosen/linux,acpi-start and /chosen/linux,acpi-len) which
@@ -307,7 +309,7 @@ void acpi_find_arm_root_pointer(acpi_physical_address *pa)
return;
}
-#endif
+#endif /* CONFIG_ACPI_USE_CHOSEN_NODE */
acpi_physical_address __init acpi_os_get_root_pointer(void)
{
@@ -329,7 +331,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
} else {
acpi_physical_address pa = 0;
-#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
+#ifdef CONFIG_ACPI_USE_CHOSEN_NODE
acpi_find_arm_root_pointer(&pa);
#else
acpi_find_root_pointer(&pa);