[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<TY3PR01MB11346B33DDA54ECE83CA8D2D086B4A@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Mon, 22 Dec 2025 14:30:19 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: geert <geert@...ux-m68k.org>, biju.das.au <biju.das.au@...il.com>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby
<jirislaby@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
<krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, magnus.damm
<magnus.damm@...il.com>, wsa+renesas <wsa+renesas@...g-engineering.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>
Subject: RE: [PATCH v5 03/17] serial: rsci: Add set_rtrg() callback
Hi Geert,
> -----Original Message-----
> From: Geert Uytterhoeven <geert@...ux-m68k.org>
> Sent: 22 December 2025 14:05
> Subject: Re: [PATCH v5 03/17] serial: rsci: Add set_rtrg() callback
>
> Hi Biju,
>
> On Sat, 29 Nov 2025 at 17:43, Biju <biju.das.au@...il.com> wrote:
> > From: Biju Das <biju.das.jz@...renesas.com>
> >
> > The rtrg variable is populated in sci_init_single() for RZ/T2H. Add
> > set_rtrg() callback for setting the rtrg value.
> >
> > Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
> > ---
> > v5:
> > * New patch.
>
> Thanks for your patch, which is now commit b346e5d7dbf66961 ("serial:
> rsci: Add set_rtrg() callback") in tty/tty-next.
>
> > --- a/drivers/tty/serial/rsci.c
> > +++ b/drivers/tty/serial/rsci.c
> > @@ -151,6 +151,22 @@ static void rsci_start_rx(struct uart_port *port)
> > rsci_serial_out(port, CCR0, ctrl); }
> >
> > +static int rsci_scif_set_rtrg(struct uart_port *port, int rx_trig) {
> > + u32 fcr = rsci_serial_in(port, FCR);
> > +
> > + if (rx_trig >= port->fifosize)
> > + rx_trig = port->fifosize - 1;
> > + else if (rx_trig < 1)
> > + rx_trig = 0;
> > +
> > + fcr &= ~FCR_RTRG4_0;
> > + fcr |= field_prep(FCR_RTRG4_0, rx_trig);
>
> FIELD_PREP(), as FCR_RTRG4_0 is a constant.
> However, this can be combined with the previous line, using FIELD_MODIFY().
>
> I have sent a follow-up patch: "[PATCH] serial: rsci: Convert to FIELD_MODIFY()".
> https://lore.kernel.org/ada3faf4698155a618ae6371b35eab121eb8b19c.1766411924.git.geert+renesas@glider.b
> e
OK, thanks for optimizing it.
Cheers,
Biju
Powered by blists - more mailing lists