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: 86562 Delivered-To: patch@linaro.org Received: by 10.182.112.6 with SMTP id im6csp1681134obb; Mon, 5 Dec 2016 05:06:06 -0800 (PST) X-Received: by 10.84.208.227 with SMTP id c32mr124234444plj.144.1480943165952; Mon, 05 Dec 2016 05:06:05 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i24si14559850pfj.295.2016.12.05.05.06.05; Mon, 05 Dec 2016 05:06:05 -0800 (PST) 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; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750841AbcLENGE (ORCPT + 2 others); Mon, 5 Dec 2016 08:06:04 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36509 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373AbcLENGD (ORCPT ); Mon, 5 Dec 2016 08:06:03 -0500 Received: by mail-wm0-f43.google.com with SMTP id g23so96248042wme.1 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=htpYuSTdNH3Tl7DqLjpZ8AgOVGOIUNMa07T60J7cDeq33yAW+oWhF0fYBIU46JNp6A McVY303ea7F1sFytHEENz5BvVQBEJoB1ABWIif0h72PitGw34V7zHdUr6yigs7z4ruzr QM6hoFHI5otwxVCD0C+G9Et753ILHpzsVtbWRNXx9mbti0MjtjbJQF43AXBgE9irBcQR 6EOWO3ESOusJw5Z0ket8dcDpZLfAEpuBpL5K8A0rqtTFcuSx6ZMBBk+EygTfxs/5kbN1 8NX3HanbIU9AAMY8M3W3HQ5kMgSZalom7TlstFygW+Jsr4BlTuWffjUXbjZaQKzFt+XX lvNw== X-Gm-Message-State: AKaTC01hMgnYczwFjJd4LGdRr+Qw85plxTxFogDprbc4FmeXPLqAlV3Zl/2UQodEJRCprzR1 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-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- drivers/acpi/spcr.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.10.2 -- 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/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: