diff options
author | Aleksey Makarov <aleksey.makarov@linaro.org> | 2016-09-27 16:54:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-28 11:46:57 -0400 |
commit | 888125a712986fd0fab99d09f42b307de32d740c (patch) | |
tree | 53e6c0d80dbb2aac0509dc7cfaa4d4d16d350e4a | |
parent | ad1696f6f09daacfdf2bf04bc83cd8f48d80e34a (diff) |
ARM64: ACPI: enable ACPI_SPCR_TABLE
SBBR mentions SPCR as a mandatory ACPI table. So enable it for ARM64
Earlycon should be set up as early as possible. ACPI boot tables are
mapped in arch/arm64/kernel/acpi.c:acpi_boot_table_init() that
is called from setup_arch() and that's where we parse SPCR.
So it has to be opted-in per-arch.
When ACPI_SPCR_TABLE is defined initialization of DT earlycon is
deferred until the DT/ACPI decision is done. Initialize DT earlycon
if ACPI is disabled.
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/arm64/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/acpi.c | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index bc3f00f586f1..11a2d36b27ef 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -4,6 +4,7 @@ config ARM64 | |||
4 | select ACPI_GENERIC_GSI if ACPI | 4 | select ACPI_GENERIC_GSI if ACPI |
5 | select ACPI_REDUCED_HARDWARE_ONLY if ACPI | 5 | select ACPI_REDUCED_HARDWARE_ONLY if ACPI |
6 | select ACPI_MCFG if ACPI | 6 | select ACPI_MCFG if ACPI |
7 | select ACPI_SPCR_TABLE if ACPI | ||
7 | select ARCH_HAS_DEVMEM_IS_ALLOWED | 8 | select ARCH_HAS_DEVMEM_IS_ALLOWED |
8 | select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI | 9 | select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI |
9 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 10 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 3e4f1a45b125..252a6d9c1da5 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/memblock.h> | 24 | #include <linux/memblock.h> |
25 | #include <linux/of_fdt.h> | 25 | #include <linux/of_fdt.h> |
26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
27 | #include <linux/serial_core.h> | ||
27 | 28 | ||
28 | #include <asm/cputype.h> | 29 | #include <asm/cputype.h> |
29 | #include <asm/cpu_ops.h> | 30 | #include <asm/cpu_ops.h> |
@@ -206,7 +207,7 @@ void __init acpi_boot_table_init(void) | |||
206 | if (param_acpi_off || | 207 | if (param_acpi_off || |
207 | (!param_acpi_on && !param_acpi_force && | 208 | (!param_acpi_on && !param_acpi_force && |
208 | of_scan_flat_dt(dt_scan_depth1_nodes, NULL))) | 209 | of_scan_flat_dt(dt_scan_depth1_nodes, NULL))) |
209 | return; | 210 | goto done; |
210 | 211 | ||
211 | /* | 212 | /* |
212 | * ACPI is disabled at this point. Enable it in order to parse | 213 | * ACPI is disabled at this point. Enable it in order to parse |
@@ -226,6 +227,14 @@ void __init acpi_boot_table_init(void) | |||
226 | if (!param_acpi_force) | 227 | if (!param_acpi_force) |
227 | disable_acpi(); | 228 | disable_acpi(); |
228 | } | 229 | } |
230 | |||
231 | done: | ||
232 | if (acpi_disabled) { | ||
233 | if (earlycon_init_is_deferred) | ||
234 | early_init_dt_scan_chosen_stdout(); | ||
235 | } else { | ||
236 | parse_spcr(earlycon_init_is_deferred); | ||
237 | } | ||
229 | } | 238 | } |
230 | 239 | ||
231 | #ifdef CONFIG_ACPI_APEI | 240 | #ifdef CONFIG_ACPI_APEI |