Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751817AbcLESwE (ORCPT ); Mon, 5 Dec 2016 13:52:04 -0500 Received: from mail-ua0-f181.google.com ([209.85.217.181]:34293 "EHLO mail-ua0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbcLESv7 (ORCPT ); Mon, 5 Dec 2016 13:51:59 -0500 MIME-Version: 1.0 In-Reply-To: <20161205130534.11080-1-aleksey.makarov@linaro.org> References: <20161205130534.11080-1-aleksey.makarov@linaro.org> From: Duc Dang Date: Mon, 5 Dec 2016 10:51:28 -0800 Message-ID: Subject: Re: [PATCH] SPCR: check bit width for the 16550 UART To: Aleksey Makarov Cc: "Rafael J . Wysocki" , linux-acpi@vger.kernel.org, linux-serial@vger.kernel.org, Linux Kernel Mailing List , Greg Kroah-Hartman , Russell King , Peter Hurley , Jon Masters , Mark Salter , Graeme Gregory , Len Brown Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1458 Lines: 44 On Mon, Dec 5, 2016 at 5:05 AM, Aleksey Makarov wrote: > 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 Tested on X-Gene 1 and X-Gene 2 platforms. Tested-by: Duc Dang > > 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 > Thanks, Duc Dang.