From patchwork Wed Apr 27 13:23:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12828845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54386C433F5 for ; Wed, 27 Apr 2022 13:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rTm+1kCOi2ni2bDK+EZHJhwedwoqE555ZMg+A64e5vQ=; b=mBsJpW59anq2yZ JHhKUTBnCdtaEihXOVnNflJjA3HBMa7+5O8ULlyO+Q7YnHHJlxUE5Qc6YxhSKxdSiNjRTB1eIqgMe aXHLw7To9taNDepvcFZsP0HnDVhsWkAr4GiO5JEyH0X75PB3fuX7+mvG8e5ZyVlqhAJoH5Lk3rAfF HxfnUaOb0eX9sIB8I9OGC9DmM0gPnF3SnfRShQTKFVpu7aYJcyugw3l9E/VIGe+zDVZtercrV+wl0 Uy5tpmxAYQigl2vPW2UjYNRVES2xQcjyWfoy7Bg8I2cbBa1VD8+1htNFfbk5nUym5Ko4on5Tcjxrm G3RkZe4B+gnZg6umWwSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njhe9-001Wco-LU; Wed, 27 Apr 2022 13:23:57 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njhe6-001WWI-27; Wed, 27 Apr 2022 13:23:55 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 7CFA81F4470F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1651065815; bh=EqjX82GXjqOFhq0gUXw4CciC7Vh5NdYSqj0fE42uX6o=; h=From:To:Cc:Subject:Date:From; b=bSxZLmiNzzvmXvS/G0LxIU/onl0isc+fFq4malUf2KNMqo23k4kNwVDTtuflJ/w4J HarckUhk1BL8we8qLtMgp3haKnf/itziBU9PrNASD+/GJXpm6aLc3D57RJhXzb9Riy l37/ujoD9a9pdwCCC0APr4XvDovBW8AS2b5t4H+Fxv7sEZou6YXG+oX7qPTrAMKnA4 3aWqVdivsu4IRy/5xbiGPti8eMVdRII8HAUoCjwfOWrVCQV4keFlrXQBnxJcEObmne Xft18vwjFIOwH3yjSNJ8DUvD1zgCney2xR9Msf+rhkaBmnlRcciKHFsLVAtaackZHb VJryDVrVaoGxg== From: AngeloGioacchino Del Regno To: gregkh@linuxfoundation.org Cc: jirislaby@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, zhiyong.tao@mediatek.com, colin.king@intel.com, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] MediaTek 8250 UART: fixes and improvements Date: Wed, 27 Apr 2022 15:23:25 +0200 Message-Id: <20220427132328.228297-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_062354_256052_4CF1BE9B X-CRM114-Status: UNSURE ( 7.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Even though the UART IP on MTK platforms is 16550A compatible, some registers are not at a "standard" offset. In order to allow full functionality of the flow control features and to make Linux able to fully and properly reconfigure the UART IP, eventually allowing communication at high speed after a full IP reset, some register offset fixes have been done. While at it, even though this bit is always set, also paranoidly make sure that the "new register map" feature is enabled, as that's done with just one writel() at probe time, introducing no overhead. This has been tested on multiple Chromebooks featuring different SoCs, and a MT6795 Xperia M5 smartphone. AngeloGioacchino Del Regno (3): serial: 8250_mtk: Fix UART_EFR register address serial: 8250_mtk: Make sure to select the right FEATURE_SEL serial: 8250_mtk: Fix register address for XON/XOFF character drivers/tty/serial/8250/8250_mtk.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)