From mboxrd@z Thu Jan 1 00:00:00 1970 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 949A3C25B6E for ; Thu, 26 Oct 2023 12:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344950AbjJZMym (ORCPT ); Thu, 26 Oct 2023 08:54:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbjJZMyl (ORCPT ); Thu, 26 Oct 2023 08:54:41 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92204AC; Thu, 26 Oct 2023 05:54:38 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id C6644E0004; Thu, 26 Oct 2023 12:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1698324877; 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=wKDMaMA6DJ6jxyYN9y6LAy5+6UvY7wLuwkWrrVpSUho=; b=c71eHCpAcB3T7/F/wyL6wgjUTI1vQcj4c3ysetN9C3h8oQnRs9OpFkPHWhzyn4MeSeuXde xr+f1ZT/3bboP47crOxldDlzmNcATU4HjZ3BFWzIH8+fBnNNChBD557Jal/yGF+/dO02bt ALJ8rUBqxguV+/s0jgWff3vO6LxdNAhAiZ34/dtxsCAPkLXctmgscgo7ui9O+U0hUOsAho r34hyawGQYj6PJ5DQAh5kOYJjlAgyhMtf35ck0Mihd9LpCrx++v5wDqPzQB4JRkfkVTXDJ bJPdeAStxafvralilsHzhvkAhYQ9QrSm2jbDc4XyCIdZjBEmYTGqkZBuVLyMqQ== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 26 Oct 2023 14:54:35 +0200 Message-Id: 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 Cc: "Russell King" , "Greg Kroah-Hartman" , "Jiri Slaby" , , , "Linus Walleij" , "Gregory CLEMENT" , "Alexandre Belloni" , "Thomas Petazzoni" , "Vladimir Kondratiev" , "Tawfik Bayouk" To: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Mailer: aerc 0.15.2 References: <20231026-mbly-uart-v1-0-9258eea297d3@bootlin.com> <20231026-mbly-uart-v1-6-9258eea297d3@bootlin.com> <3cc1f559-468-8a58-a919-bdfb45ecc90@linux.intel.com> In-Reply-To: <3cc1f559-468-8a58-a919-bdfb45ecc90@linux.intel.com> X-GND-Sasl: theo.lebrun@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Hi, On Thu Oct 26, 2023 at 1:13 PM CEST, Ilpo J=C3=A4rvinen wrote: > On Thu, 26 Oct 2023, Th=C3=A9o Lebrun wrote: > >=20 > > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-= pl011.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 uar= t_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 */ > > 0x60 needs to be replaced with a named define! Fixed locally for the next revision, thanks! -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com