From patchwork Tue Dec 6 17:58:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksey Makarov X-Patchwork-Id: 86885 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2146887qgi; Tue, 6 Dec 2016 09:59:12 -0800 (PST) X-Received: by 10.99.140.77 with SMTP id q13mr114281158pgn.109.1481047152052; Tue, 06 Dec 2016 09:59:12 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u90si20368463pfd.87.2016.12.06.09.59.11; Tue, 06 Dec 2016 09:59:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-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-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-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 S1752199AbcLFR6y (ORCPT + 7 others); Tue, 6 Dec 2016 12:58:54 -0500 Received: from mail-wj0-f175.google.com ([209.85.210.175]:34774 "EHLO mail-wj0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103AbcLFR6v (ORCPT ); Tue, 6 Dec 2016 12:58:51 -0500 Received: by mail-wj0-f175.google.com with SMTP id tg4so76148455wjb.1 for ; Tue, 06 Dec 2016 09:58:51 -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:in-reply-to:references; bh=nWWSnaVk4HakFs5htOoDEnNGRRDgrLEqcQdIePNTw64=; b=CMWtrm8XSiSqGsWFaOvg5v6LsP92FYarW6UZ4eGrDWVHMH25tQUlqNgtwChN6Wimuw cqcE5bzg/ElzgCM/S4Vh7+pBjWAZFWqa5IhpPCl+tGSYpzpCmUevWJ5X7VZh6C1OzdqL Q5K9IHEKWuQCuZw7wwDNyhAIPHa5x9sMH5HaE= 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=nWWSnaVk4HakFs5htOoDEnNGRRDgrLEqcQdIePNTw64=; b=KozPLv6YgDkIQTKBgUARk7jVVKylNir2SR0LeoUPJGGoKbNnwUGOkoAOCiB31IdOOt jd9gYWzo1a0/vp9DrUq5dOlCuJueJNGPvw9xg5nduNiZQwbI40hijaqsq+QWLRq8HSsf 5FZJ0wrGUIOr1u/T3BwAD60X+td9fsG70nikHdEel2c+ZRpk+bwKoA5OfdsTv9FMcuLJ K0BRbfjneO/g0Ij0kkw3/G7dbUek89OuUBbO5lvph0Helv9T0DUwW9XnwWL8fhNxLLm6 GnR1foHtyTHUx0s8gnZIGxw9gejvkdXeI3RvyjkC/jjoL4kj1DINQUpmgyI2UMDAxpF3 wTpA== X-Gm-Message-State: AKaTC03pPAYIZd524PBcNdfHnhuEYLUasFOOsuID+kHoLVi5rc6LVSUd1gfGR1F4qb3wh55t X-Received: by 10.25.196.88 with SMTP id u85mr24303396lff.69.1481047130224; Tue, 06 Dec 2016 09:58:50 -0800 (PST) Received: from localhost.localdomain (host-95-189-166-46.pppoe.omsknet.ru. [95.189.166.46]) by smtp.gmail.com with ESMTPSA id y26sm3972918lja.22.2016.12.06.09.58.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Dec 2016 09:58:49 -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 , Rob Herring , Graeme Gregory , Len Brown Subject: [RFC v2 1/4] ACPI: SPCR: check bit width for the 16550 UART Date: Tue, 6 Dec 2016 23:58:26 +0600 Message-Id: <20161206175830.6989-2-aleksey.makarov@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161206175830.6989-1-aleksey.makarov@linaro.org> References: <20161206175830.6989-1-aleksey.makarov@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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 width is defined by the Interface Type field of the SPCR table. 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-acpi" 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: