Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751618AbcLENGJ (ORCPT ); Mon, 5 Dec 2016 08:06:09 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35534 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbcLENGD (ORCPT ); Mon, 5 Dec 2016 08:06:03 -0500 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1085 Lines: 35 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(+) 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: -- 2.10.2