Message ID | 20160905123617.18775-4-aleksey.makarov@linaro.org |
---|---|
State | Accepted |
Commit | 888125a712986fd0fab99d09f42b307de32d740c |
Headers | show |
On 2016/9/8 19:16, Will Deacon wrote: > On Wed, Sep 07, 2016 at 12:30:19PM +0300, Aleksey Makarov wrote: >> >> On 09/05/2016 03:36 PM, Aleksey Makarov wrote: >>> 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. >> >> Hi Will, Catalin, >> >> Can you review this patch and consider ACKing it please? > > Hanjun, Al, Mark, Graeme -- any comments on this? We tested this patch on D02, although d02 is 8250 based uart, but this patch is the core part, which makes sense to me, Acked-by: Hanjun Guo <hanjun.guo@linaro.org> Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2016/9/9 0:34, Mark Salter wrote: > On Thu, 2016-09-08 at 12:16 +0100, Will Deacon wrote: >> On Wed, Sep 07, 2016 at 12:30:19PM +0300, Aleksey Makarov wrote: >>> >>> >>> On 09/05/2016 03:36 PM, Aleksey Makarov wrote: >>>> >>>> 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. >>> Hi Will, Catalin, >>> >>> Can you review this patch and consider ACKing it please? >> Hanjun, Al, Mark, Graeme -- any comments on this? >> >> Will > > I think there is a problem still with systems using 32-bit access to 8250 > UARTs (i.e. Mustang) but that will need a DBG2 table spec change and > followup patch to resolve. Hmm, I think you mean we can add patches later with the spec updated, and this patch works with SBSA pl011 can go for now? Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index bc3f00f..11a2d36 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -4,6 +4,7 @@ config ARM64 select ACPI_GENERIC_GSI if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI select ACPI_MCFG if ACPI + select ACPI_SPCR_TABLE if ACPI select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 3e4f1a4..252a6d9 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -24,6 +24,7 @@ #include <linux/memblock.h> #include <linux/of_fdt.h> #include <linux/smp.h> +#include <linux/serial_core.h> #include <asm/cputype.h> #include <asm/cpu_ops.h> @@ -206,7 +207,7 @@ void __init acpi_boot_table_init(void) if (param_acpi_off || (!param_acpi_on && !param_acpi_force && of_scan_flat_dt(dt_scan_depth1_nodes, NULL))) - return; + goto done; /* * ACPI is disabled at this point. Enable it in order to parse @@ -226,6 +227,14 @@ void __init acpi_boot_table_init(void) if (!param_acpi_force) disable_acpi(); } + +done: + if (acpi_disabled) { + if (earlycon_init_is_deferred) + early_init_dt_scan_chosen_stdout(); + } else { + parse_spcr(earlycon_init_is_deferred); + } } #ifdef CONFIG_ACPI_APEI