Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp250455rdb; Tue, 31 Oct 2023 06:39:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnfvYQ06ldVZgkZWKfZygDYvFf2pFJv5kY6PLXF9vaQplC7sS8fk/jiBwjEo0v+ynnoabi X-Received: by 2002:a05:6a00:22cb:b0:6b6:e147:717 with SMTP id f11-20020a056a0022cb00b006b6e1470717mr15728710pfj.23.1698759564777; Tue, 31 Oct 2023 06:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698759564; cv=none; d=google.com; s=arc-20160816; b=SemlHr4UG6eOTnHwzyiANhrA10fzS+bpoRyXK8XJXvZW9mCHBqpE2koBIa5FRbAiqK u/nQKqPl4awGZhZCjPnc9lO1NMrpmVadlHD4PP5pYSaH+lUSJL5M7ntItF2DEKXVV76Q WWoO+uGja1xF8qdRrdLnm1f2t2rX20usDlHASmGA+JPYc/Xrgy+ztSOsRgk6+97GopZw llnNCrQ6WFHIty0Daxn5uXwA0Lv1eZ5iFfrotyhOFc1ZdFymEmv5olOzPXh3PJgj8fGj UJ2ozo9J+kAD4rfd87HQ3EjmLTdg2hfPdguq66R94yC9ssir6GX5NenEsLexL2iJM7KV wayA== 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=E/yUX/f4ZCe3DyW2zI4fL8vzPIun1wWgfcaAJyJfsSA=; fh=fvFslU8K1e5GCs9SarACLtbC/57dZTaXzBt1bPsjmlg=; b=e8hfAK6YOYBxP6p6EQ8Rf9Kc7welZWvU3ElghrlcJ5HrknhYo17ohBB4csLOac+KF5 lIaXWqrWWHJKdzfUNqY1rQh4Sj/9BfQFTW1zSOcYU8wDUNjUS7T8hmkCrd+V9t0ZHbJl WoCz8eoMLxu5hOxqr6ucqCOoxvTC+nYZj5tP94lGTZBqScZjUCVmKnr29iNL5rG7znjM QYsb8h3lYCOcBkQIR3l6kxw9e8uljfpSFetlA1kpIhnyMcuz2Gv/Kdz45cHRe7PnuZxg 3rLrsA0o5myKn4SG/SlXjLtfYSgBWyXnN8rZdQtDC5rjajhG8GnkSTYrE9e8SEHxJh6K qIPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=K6C6qQbM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id a22-20020a056a000c9600b006a15afe16c2si1029822pfv.296.2023.10.31.06.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 06:39:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=K6C6qQbM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 11E2180BC3FA; Tue, 31 Oct 2023 06:39:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344613AbjJaNjQ (ORCPT + 99 others); Tue, 31 Oct 2023 09:39:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344599AbjJaNjP (ORCPT ); Tue, 31 Oct 2023 09:39:15 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03D34E6; Tue, 31 Oct 2023 06:39:12 -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=E/yUX/f4ZCe3DyW2zI4fL8vzPIun1wWgfcaAJyJfsSA=; b=K6C6qQbMSnrXsvrXDh8sNCgaUe EHjQ50sGgULoNbjtSR7S8tzUutGq/zji5Iiq74+KyaChkfPgTX1Qb5oN/RE7jAtkJJJrQZMas1r+y cyETvV7KrlgMtpCPIOD3xc4Gl9F8PNrSY+5vrMKTTKJhU8Z/r2Zyec5xacPEOUFZXTM0=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:52896 helo=pettiford) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qxoxS-00067I-Kz; Tue, 31 Oct 2023 09:39:04 -0400 Date: Tue, 31 Oct 2023 09:39:01 -0400 From: Hugo Villeneuve To: =?ISO-8859-1?Q?Th=E9o?= Lebrun Cc: "Russell King" , "Greg Kroah-Hartman" , "Jiri Slaby" , , , "Linus Walleij" , "Gregory CLEMENT" , "Alexandre Belloni" , "Thomas Petazzoni" , "Vladimir Kondratiev" , "Tawfik Bayouk" Message-Id: <20231031093901.aa085ec1316ab0d008cb0080@hugovil.com> In-Reply-To: References: <20231026-mbly-uart-v1-0-9258eea297d3@bootlin.com> <20231026-mbly-uart-v1-6-9258eea297d3@bootlin.com> <20231026105329.0ee9603563202bd2157a7d27@hugovil.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 pete.vger.email X-Spam-Level: X-Spam-Status: No, score=-3.8 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,T_SCC_BODY_TEXT_LINE,URIBL_CSS 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 (pete.vger.email [0.0.0.0]); Tue, 31 Oct 2023 06:39:22 -0700 (PDT) On Tue, 31 Oct 2023 10:35:29 +0100 Th=E9o Lebrun wrote: > Hello, >=20 > On Thu Oct 26, 2023 at 4:53 PM CEST, Hugo Villeneuve wrote: > > 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 configu= red > > > 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. >=20 > I agree the whole commit message is unclear. Let's rewrite it. What do > you think of the following: >=20 > tty: serial: amba-pl011: Allow parsing word length of 5/6 bits at cons= ole setup >=20 > If no options are given at console setup, we parse hardware register > LCRH_TX.WLEN for bits per word. We compare the value to the 7 bits > value (UART01x_LCRH_WLEN_7). If the hardware is configured for 5, 6 > or 8 bits per word, we fallback to 8 bits. >=20 > Change that behavior to parse the whole range available: from 5 to 8 > bits per word. >=20 > Note that we don't add support for 5/6 bits, we only update the parsing > of the regs (if no options are passed at setup) to reflect the current > hardware config. The behavior will be different only if the inherited > value (from reset/bootloader) is 5 or 6: previously we guessed 8 bits > word length, now we guess the right value. >=20 > What's your opinion on this new commit message? Hi, that's fine with me. Hugo.