From patchwork Thu Mar 24 12:52:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 64349 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp623062lbc; Thu, 24 Mar 2016 05:55:18 -0700 (PDT) X-Received: by 10.98.8.74 with SMTP id c71mr12639498pfd.155.1458824110491; Thu, 24 Mar 2016 05:55:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o129si12168796pfo.19.2016.03.24.05.55.10; Thu, 24 Mar 2016 05:55:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757190AbcCXMyq (ORCPT + 1 other); Thu, 24 Mar 2016 08:54:46 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:32807 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757437AbcCXMyf (ORCPT ); Thu, 24 Mar 2016 08:54:35 -0400 Received: by mail-lb0-f169.google.com with SMTP id oe12so29656731lbc.0 for ; Thu, 24 Mar 2016 05:54:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1uocBWwHQxXc+lGHQqShm0XHYYisGFIadIi/YDVSLhU=; b=haT4T+Abd08janArLiSb7IsE5aJdssVu7+p3ixmbbIAnw686iMujRRJMd6XmLXYcH6 SS+JhzqvsNn2uOlQsgdZ351HhI8O+WpFj0Ts97SEVnksEsqvGsmKQgJH55WrIibVUaqj 8HCVd8yMuvITj3YNx/PGZoGLxgjDYFDI0yodM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1uocBWwHQxXc+lGHQqShm0XHYYisGFIadIi/YDVSLhU=; b=hNqO2R900/ANyzOBpoSSAYD8oaaAKH8R8cS9etpehISw1DsrVGNGf59wT6LIw9qraG Ip678yrurijcTpqQL8fTmwbT7+/1f9VLDmsKi3jb7zBIgTmHayJ6K/uqsk2LIGZ1fGZa pXaqpRECM4kQVAvrVpqmkzTcrBPIvK8zlUQKrfBx7lpUMV67nLJ1mgkX9PCtwAGp4pix tFWk1Agg3BFSlX5NKcD6djcZKzcPzZewCuFSl2KePLaH+yM1mjpsVAW0aKZNkf9kKAAq PI/Lh7BFh5eSF3cggkt9pVLfG7awLl7DBkIjkoHooF9z6yFjDiOGz4otDC9F3gHZL7AW 7k6Q== X-Gm-Message-State: AD7BkJJ6Kuddqlr9uNaeO+bTQbxGx2VPy2urbLcpT9ahp0Ths2aYLNTFj21eHS5slUjad2M5 X-Received: by 10.112.46.136 with SMTP id v8mr2744452lbm.38.1458824073735; Thu, 24 Mar 2016 05:54:33 -0700 (PDT) Received: from turnip.localdomain (nivc-213.auriga.ru. [80.240.102.213]) by smtp.gmail.com with ESMTPSA id rh2sm1167378lbb.36.2016.03.24.05.54.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Mar 2016 05:54:32 -0700 (PDT) From: Aleksey Makarov To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Len Brown Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Aleksey Makarov , Russell King , Leif Lindholm , Graeme Gregory , Al Stone , Christopher Covington , Yury Norov , Peter Hurley , "Zheng, Lv" , Catalin Marinas , Will Deacon Subject: [PATCH v6 4/5] ACPI: enable ACPI_SPCR_TABLE on ARM64 Date: Thu, 24 Mar 2016 15:52:02 +0300 Message-Id: <1458823925-19560-5-git-send-email-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1458823925-19560-1-git-send-email-aleksey.makarov@linaro.org> References: <1458823925-19560-1-git-send-email-aleksey.makarov@linaro.org> Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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() called from setup_arch() and that's where we parse SPCR. So it has to be opted-in per-arch. Signed-off-by: Aleksey Makarov --- arch/arm64/Kconfig | 1 + arch/arm64/kernel/acpi.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" 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 07b6a16..c77b4b2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -3,6 +3,7 @@ config ARM64 select ACPI_CCA_REQUIRED if ACPI select ACPI_GENERIC_GSI if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI + select ACPI_SPCR_TABLE if ACPI select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_ELF_RANDOMIZE diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index d1ce8e2..046f095 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -189,7 +189,7 @@ void __init acpi_boot_table_init(void) */ if (param_acpi_off || (!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 @@ -209,6 +209,9 @@ void __init acpi_boot_table_init(void) if (!param_acpi_force) disable_acpi(); } + +done: + parse_spcr(); } #ifdef CONFIG_ACPI_APEI