Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp120578rdb; Tue, 31 Oct 2023 02:36:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPNlzZ97skOcCkYNRCCS4j7VWQ57mdLYyyw9zeHBNbnqhUHiSnKZpV3NhcbFhYaxr6CX8E X-Received: by 2002:a05:6358:898:b0:168:d169:44 with SMTP id m24-20020a056358089800b00168d1690044mr12781900rwj.1.1698744961318; Tue, 31 Oct 2023 02:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698744961; cv=none; d=google.com; s=arc-20160816; b=IrcwQwbTN6+x2WkMkJl7mkBNeKEkCZdmyrYBPvPpoCu4dp2jGiv3c0Gfxi1xym1vpY i6e7wqvTUWrmBmC46R7IGdR5FnieIbRpOdoe040MJ434YRqW2uLH65m8nvjqygkUFJX8 6jCCwaB1pdCGWERIhw5veiVkE8ZlIqDrwFTPKSriANgfTCfOphcARwHMfKqeqxObLKty AigT/sXT7FigBGM2HIy2AR6w3B85XkLssbgiHERqibmpvNVq6puIosZe2/dW0nGVY2fA N3ZQZKIOt7cl42j7yj1weeatftWRBV/BGL0hCwG19U7IYpOoC8zMiL0QOZEc8qYRc9Us Incg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:subject:from:to:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=n3XKuvd+q+DDx/4/LtaFkuULZmEMgjP7tMlhhkc6940=; fh=WjUF1AzEpurM/OuBU9V9+iAy4oi7QMdSAJ5vUer31T0=; b=xrFyxWkafZpKulSHdKcf9QCHcQaGRNe82+D176jFD1TfZ1SEHpPKM1OcmZEibaVi9O KQl5LG3PneomanvTgTIhMzY1Quv8b9dvjAMGuRISYPTJgIrA84n2f1oGq82k1qhLhzYq ir9I3jFUlaoUg+9QFUabsR2eOJBVo+PcAusgE0OrQTLXU4gvUMdRxwloydYts6+FYQz/ osu4I+s7TfTBwkq3UzU0sG1ug9OGS03bD+zSKYj65sdXYl1VlhhPSZYKi7tTI/c7Zgk+ a6UI2wSg1lcvb1CVHsyfrDTkSOnxRncXejkT1gV75z4V4GrJtrjRyebAsTeGVJ1be4XG O78Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kDTWWWfB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id k62-20020a638441000000b0057b55b52870si823499pgd.170.2023.10.31.02.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 02:36:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kDTWWWfB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 14B1380B8F27; Tue, 31 Oct 2023 02:35:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343875AbjJaJfk (ORCPT + 99 others); Tue, 31 Oct 2023 05:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343944AbjJaJfi (ORCPT ); Tue, 31 Oct 2023 05:35:38 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 512D8B7; Tue, 31 Oct 2023 02:35:34 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9C75C1BF208; Tue, 31 Oct 2023 09:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1698744933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n3XKuvd+q+DDx/4/LtaFkuULZmEMgjP7tMlhhkc6940=; b=kDTWWWfBRbS8JJnlwhk6rtBmf+O202sJqbdO/h6ndj/0WLThDi9sGzFQsNINcts+7nhmLu RlZQpyG3AvH65hp/msgEtEUZ22E9A5CSi6v4F4wmyi+HTHi8ZqOeD/Msu0QR7QLD9YELES K19fhKTRui2lVqOryzR8+ir1UM/U2alCHbS0ToorLYAmljw4+ZYiklhIb+rb04Lq57eWZS bZZE4lMPmZ0+LlNypmt5DwnR2WB6c2peUg4/LOdPH8sVYRQANQJYAfBYWlS6VTofujYzIo loNxrXgrOQmb+O7a8fuTZ1lUE8ZS98sXhUXi3k0+qgSrFoeBGCHgIZlQdzQmng== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 31 Oct 2023 10:35:29 +0100 Message-Id: Cc: "Russell King" , "Greg Kroah-Hartman" , "Jiri Slaby" , , , "Linus Walleij" , "Gregory CLEMENT" , "Alexandre Belloni" , "Thomas Petazzoni" , "Vladimir Kondratiev" , "Tawfik Bayouk" To: "Hugo Villeneuve" From: =?utf-8?q?Th=C3=A9o_Lebrun?= Subject: Re: [PATCH 6/6] tty: serial: amba-pl011: Parse bits option as 5, 6, 7 or 8 in _get_options X-Mailer: aerc 0.15.2 References: <20231026-mbly-uart-v1-0-9258eea297d3@bootlin.com> <20231026-mbly-uart-v1-6-9258eea297d3@bootlin.com> <20231026105329.0ee9603563202bd2157a7d27@hugovil.com> In-Reply-To: <20231026105329.0ee9603563202bd2157a7d27@hugovil.com> X-GND-Sasl: theo.lebrun@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 02:35:48 -0700 (PDT) Hello, On Thu Oct 26, 2023 at 4:53 PM CEST, Hugo Villeneuve wrote: > On Thu, 26 Oct 2023 12:41:23 +0200 > Th=C3=A9o 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 configure= d > > 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. I agree the whole commit message is unclear. Let's rewrite it. What do you think of the following: tty: serial: amba-pl011: Allow parsing word length of 5/6 bits at consol= e setup 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. Change that behavior to parse the whole range available: from 5 to 8 bits per word. 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. What's your opinion on this new commit message? Thanks! -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com