From patchwork Thu Aug 3 14:05:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 710161 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BB68EB64DD for ; Thu, 3 Aug 2023 14:07:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234998AbjHCOG7 (ORCPT ); Thu, 3 Aug 2023 10:06:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232999AbjHCOGo (ORCPT ); Thu, 3 Aug 2023 10:06:44 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD0230E9; Thu, 3 Aug 2023 07:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To :From:Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=ei2wCQs5a8m/K55enHBWGLUeT7zj3KuxqVqPoZlHPio=; b=b 0BgpSixVIJOcmpcWBH6vWBTM1g1yaJTSN4HtX8wh7lf/OB2ViTYXM9e1EJLJGV86gFK+rD52QZEx2 StICkocnRmwFKeAKllQHt6vFv3HsJQXrSn1+p6ra36CSKTuVPs9z6FJh1DAqI/BnaxivPMdyqzrSe cALV3c5uZGY+TYEQ=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:46952 helo=localhost.localdomain) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qRYxe-0000O1-Vi; Thu, 03 Aug 2023 10:05:55 -0400 From: Hugo Villeneuve To: Greg Kroah-Hartman , Jiri Slaby Cc: hugo@hugovil.com, linux-serial@vger.kernel.org, Hugo Villeneuve , linux-kernel@vger.kernel.org Date: Thu, 3 Aug 2023 10:05:51 -0400 Message-Id: <20230803140551.970141-1-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 184.161.19.61 X-SA-Exim-Mail-From: hugo@hugovil.com Subject: [PATCH] serial: max310x: add comments for membase address workaround X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Hugo Villeneuve Add comments about workaround used to configure membase address. This follows suggestions made during review of a sc16is7xx driver patch to add the same workaround. Link: https://lore.kernel.org/lkml/2936e18f-44ea-faed-9fa0-2ddefe7c3194@linux.intel.com Link: https://lore.kernel.org/lkml/20230801131655.80bd8f97f018dda6155d65f6@hugovil.com/ Signed-off-by: Hugo Villeneuve --- drivers/tty/serial/max310x.c | 5 +++++ 1 file changed, 5 insertions(+) base-commit: 426263d5fb400ccde5444748693dc75bda18f01e diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index 416d553b73a7..5903dd033fd0 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -1369,6 +1369,11 @@ static int max310x_probe(struct device *dev, const struct max310x_devtype *devty s->p[i].port.flags = UPF_FIXED_TYPE | UPF_LOW_LATENCY; s->p[i].port.iotype = UPIO_PORT; s->p[i].port.iobase = i; + /* + * Use all ones as membase to make sure uart_configure_port() in + * serial_core.c does not abort for SPI/I2C devices where the + * membase address is not applicable. + */ s->p[i].port.membase = (void __iomem *)~0; s->p[i].port.uartclk = uartclk; s->p[i].port.rs485_config = max310x_rs485_config;