From patchwork Mon Dec 5 13:05:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 9460959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6AD6460236 for ; Mon, 5 Dec 2016 13:06:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5506D262AE for ; Mon, 5 Dec 2016 13:06:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49B1C27A98; Mon, 5 Dec 2016 13:06:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD65B262AE for ; Mon, 5 Dec 2016 13:06:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751364AbcLENGF (ORCPT ); Mon, 5 Dec 2016 08:06:05 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:37434 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbcLENGD (ORCPT ); Mon, 5 Dec 2016 08:06:03 -0500 Received: by mail-wm0-f41.google.com with SMTP id t79so91813546wmt.0 for ; Mon, 05 Dec 2016 05:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HCbiIh3XdR9VJJsZ6lveuwYEz1GuLwIbOVr81n63uHc=; b=i6xryxqlmebsO75IDpYMxwdwwPwoP2AMHt4GWFs5lCMcvcwKyh797HxL8jGqvLO+2t moiJP9eq5x/JVJSKMjXzkzxg7rRbH7fC8+/LxWmQUpZrEd5Y1nxDfHQiyO/PzA65eUJo WwBPBUFX6I3rYe+ZY5Vq0vN1H3NTy6zTHbBAU= 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; bh=HCbiIh3XdR9VJJsZ6lveuwYEz1GuLwIbOVr81n63uHc=; b=HOI6QhK7xbiU+YwgEqCc1a7L7v/oNOghjUlC1oAH+DmBYjL7bq1rOfQEcJmiOrwsZC emsdRLjtXcBjIqGHhCpHKi4dVAlGIkWXVJS6Q4IIkUk1Zv9d7KQr/RwK9V67iQpbel2l YoaZ2GkLZf6ihKgl3WJi0XucrhCwvOv2Ics9m3FGc2R1NPGEBQftxxtGwux7BTxf05Gd RNI22fvd05xf7eyrq6wlwDBMCH8C6eiWKkig8dGYvnm4KQzgjKnKGfhjGdVRvYK4WNjn E1UlDr7lHCOgSP/tdIGY1YkxNwnqss82157iJtscMuAah94YMDSVYiH8GnVEzpmVPD8W kSZA== X-Gm-Message-State: AKaTC03ajPqC20p6JXDI6WQ/sikFcDFS3SNWZjn2TiwV+EUerWtmjaunCKeS9EOK/Hd8XoHJ X-Received: by 10.25.209.195 with SMTP id i186mr18565036lfg.54.1480943141340; Mon, 05 Dec 2016 05:05:41 -0800 (PST) Received: from localhost.localdomain (host-90-188-134-86.pppoe.omsknet.ru. [90.188.134.86]) by smtp.gmail.com with ESMTPSA id x4sm2937428lff.15.2016.12.05.05.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 05:05:40 -0800 (PST) From: Aleksey Makarov To: "Rafael J . Wysocki" Cc: linux-acpi@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Russell King , Peter Hurley , Aleksey Makarov , Jon Masters , Mark Salter , Duc Dang , Graeme Gregory , Len Brown Subject: [PATCH] SPCR: check bit width for the 16550 UART Date: Mon, 5 Dec 2016 19:05:12 +0600 Message-Id: <20161205130534.11080-1-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.10.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Check the 'Register Bit Width' field of the ACPI Generic Address Structure that specifies the address of the UART registers to decide if the driver should use "mmio32" access instead of "mmio". If the driver is other than 16550 the access with is defined by the Interface Type field of the SPCR table. For discussion: https://lkml.kernel.org/r/7fa523de-3fbb-1566-f521-927143f73d1e@redhat.com Signed-off-by: Aleksey Makarov Signed-off-by: Graeme Gregory Reported-by: Heyi Guo Tested-by: Duc Dang --- drivers/acpi/spcr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c index e8d7bc7..6c6710b 100644 --- a/drivers/acpi/spcr.c +++ b/drivers/acpi/spcr.c @@ -70,6 +70,10 @@ int __init parse_spcr(bool earlycon) break; case ACPI_DBG2_16550_COMPATIBLE: case ACPI_DBG2_16550_SUBSET: + if (table->serial_port.space_id == + ACPI_ADR_SPACE_SYSTEM_MEMORY && + table->serial_port.bit_width == 32) + iotype = "mmio32"; uart = "uart"; break; default: