Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp496477rdh; Thu, 26 Oct 2023 07:53:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgmgVnYM1YG5ETZ5eNkVVYR5MQHRFtpoOvv3mUchh+WYQaG7ZxGxLLGFanWHuG3/ZSQ//g X-Received: by 2002:a05:690c:38b:b0:5a8:1ffe:eb4e with SMTP id bh11-20020a05690c038b00b005a81ffeeb4emr21751215ywb.34.1698332032131; Thu, 26 Oct 2023 07:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698332032; cv=none; d=google.com; s=arc-20160816; b=a59gh4hzIRIyGc7rdNSg0e5XMuv8M/nqQ0UhbHQD4Sakvp8IljoNqFsqTBLsIQNIhl WEpqzHFkBeQ12XWquiOXHoUIzh4pbLvXbm2/eR1aI9VR7PvFy4MPAx5E3pZcztpFKlHo 90UbvLM6m4UIQuTxf3gQiJ8cuxakg8/Bd50KJfH7RX/xxtu+G83DmBFjKuS9d6ygGvXR ZsXrh9hS/+0kAWx7DICwpKA19JA63eCXVpkca8u/MeBQN+Jnzh555/fMXY8oFeWy0CEp TFPwxtmy2ZVb6V5V8wA+DIE6VB6q89aVSJfVWM1TMvSP4ufpJD8chATbO75UpkOCcjQq c5/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=w6udVa4KUY8OESpc/iEhA/RHWN8N+ZaBUDRJEiNm8UQ=; fh=Xee5YeIKhgKfhxQCXVZszxRTQG6kl1+cp07Kjo2+Rhs=; b=XNOqMnO5Rxo+28UKH2O09sgfy+Qj5oSDgg2qiBDcNrxfS0xXevU8MOY88it2zrhobD DyDgjCFyJOAVcEMmKREYWBBWXRhPwg2SHmGlTwD+lK69CvAzvtWetS8vlNSh4CHRxi8U Wm7AQN/62XuEGHsKnVISd1/0VQkSDhcvJu4HvRrDk+R9cNatN4DD+WLJ/qpars0zxAUT p6Vp5HNpSnxzmDiJQtUouiCI/tt9N/fspsiJxqqXL4R4KO5pgbrEnWuTJ8Pf13Gwcchk w/gBDhhQtq7sSBDOChjRujvzpREyEd73wcOxK/Rhcx4ebU3bMQk3eqIhgsZEt5BUkF6Z NITA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=qGnAHknZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id p71-20020a0de64a000000b0059f57af3be5si14711217ywe.46.2023.10.26.07.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 07:53:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=qGnAHknZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 28711824C4E5; Thu, 26 Oct 2023 07:53:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345339AbjJZOxi (ORCPT + 99 others); Thu, 26 Oct 2023 10:53:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235105AbjJZOxh (ORCPT ); Thu, 26 Oct 2023 10:53:37 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 445DE1AB; Thu, 26 Oct 2023 07:53:35 -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:Cc:To:From :Date:subject:date:message-id:reply-to; bh=w6udVa4KUY8OESpc/iEhA/RHWN8N+ZaBUDRJEiNm8UQ=; b=qGnAHknZk5303TPW5XwmmRAOwt 1vg8nM9bJvMGqK58yAERPJfSzd8POJ7+Se9WS/UYl9OM7SNiVWrCG7AGV4fLyBvC8mdNe5Dw/6VPo VwvBEusfs2CQSLhNSghyuePvixQuDkPo12emztbL+WClTQpyqdDy4TEU9y3Y+Ty7itbs=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:51632 helo=pettiford) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qw1jm-0008PR-3F; Thu, 26 Oct 2023 10:53:31 -0400 Date: Thu, 26 Oct 2023 10:53:29 -0400 From: Hugo Villeneuve To: =?ISO-8859-1?Q?Th=E9o?= Lebrun Cc: Russell King , Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Linus Walleij , Gregory CLEMENT , Alexandre Belloni , Thomas Petazzoni , Vladimir Kondratiev , Tawfik Bayouk Message-Id: <20231026105329.0ee9603563202bd2157a7d27@hugovil.com> In-Reply-To: <20231026-mbly-uart-v1-6-9258eea297d3@bootlin.com> References: <20231026-mbly-uart-v1-0-9258eea297d3@bootlin.com> <20231026-mbly-uart-v1-6-9258eea297d3@bootlin.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Subject: Re: [PATCH 6/6] tty: serial: amba-pl011: Parse bits option as 5, 6, 7 or 8 in _get_options 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 26 Oct 2023 07:53:49 -0700 (PDT) On Thu, 26 Oct 2023 12:41:23 +0200 Th=E9o Lebrun wrote: Hi, I would change the commit title to better indicate that you add support for bits 5 and 6, which was missing. Maybe "Add support for 5 and 6 bits in..." ? > pl011_console_get_options() gets called to retrieve currently configured > options from the registers. Previously, LCRH_TX.WLEN was being parsed It took me some time to understand your explanation :) Maybe change to: "Previously, only 7 or 8 bits were supported." > as either 7 or 8 (fallback). Hardware supports values from 5 to 8 Add bits: "5 to 8 bits..." And indicate that this patch adds support for 5 and 6 bits. > inclusive, which pl011_set_termios() exploits for example. >=20 > Signed-off-by: Th=E9o Lebrun > --- > drivers/tty/serial/amba-pl011.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) >=20 > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl= 011.c > index 5774d48c7f16..b2062e4cbbab 100644 > --- a/drivers/tty/serial/amba-pl011.c > +++ b/drivers/tty/serial/amba-pl011.c > @@ -2384,10 +2384,7 @@ static void pl011_console_get_options(struct uart_= amba_port *uap, int *baud, > *parity =3D 'o'; > } > =20 > - if ((lcr_h & 0x60) =3D=3D UART01x_LCRH_WLEN_7) > - *bits =3D 7; > - else > - *bits =3D 8; > + *bits =3D FIELD_GET(0x60, lcr_h) + 5; /* from 5 to 8 inclusive */ Capital "F" -> "From...". And add "bits" -> "From 5 to 8 bits..." Hugo. > =20 > ibrd =3D pl011_read(uap, REG_IBRD); > fbrd =3D pl011_read(uap, REG_FBRD); >=20 > --=20 > 2.41.0 >=20