[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXshthP8nrV-qP=fSv6HGCDj47x9_jQYobZTEivy15tvw@mail.gmail.com>
Date: Fri, 21 Nov 2025 15:46:29 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Biju <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>, Biju Das <biju.das.jz@...renesas.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, devicetree@...r.kernel.org,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v3 12/13] serial: sh-sci: Add support for RZ/G3E RSCI SCIF
Hi Biju,
On Fri, 14 Nov 2025 at 11:52, Biju <biju.das.au@...il.com> wrote:
> From: Biju Das <biju.das.jz@...renesas.com>
>
> Add support for RZ/G3E RSCI SCIF(a.k.a FIFO mode). RSCI IP found on the
> RZ/G3E SoC is similar to RZ/T2H, but it has a 32-stage FIFO. it has 6
> clocks(5 module clocks + 1 external clock) instead of 3 clocks(2 module
> clocks + 1 external clock) on T2H and has multiple resets. Add support
> for the hardware flow control.
>
> Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
> ---
> v2->v3:
> * Dropped cpu_relax() from rsci_finish_console_write() and added a
> comment.
> * Added sci_is_rsci_fifo_type() helper for reuse in probe() and remove().
Thanks for the update!
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -3563,6 +3563,11 @@ static struct uart_driver sci_uart_driver = {
> .cons = SCI_CONSOLE,
> };
>
> +static bool sci_is_rsci_fifo_type(u8 type)
> +{
> + return (type == SCI_PORT_RSCI || type == RSCI_PORT_SCIF);
> +}
> +
> static void sci_remove(struct platform_device *dev)
> {
> struct sci_port *s = platform_get_drvdata(dev);
> @@ -3574,7 +3579,7 @@ static void sci_remove(struct platform_device *dev)
> if (s->port.fifosize > 1)
> device_remove_file(&dev->dev, &dev_attr_rx_fifo_trigger);
> if (type == PORT_SCIFA || type == PORT_SCIFB || type == PORT_HSCIF ||
> - type == SCI_PORT_RSCI)
> + sci_is_rsci_fifo_type(type))
I think Jiri intended[1] having a helper that covers all cases, not
just the two RSCI variants. E.g. sci_has_fifo(u8 type).
> device_remove_file(&dev->dev, &dev_attr_rx_fifo_timeout);
> }
>
> @@ -3669,6 +3674,10 @@ static const struct of_device_id of_sci_match[] __maybe_unused = {
> .data = &of_sci_scif_rzv2h,
> },
> #ifdef CONFIG_SERIAL_RSCI
> + {
> + .compatible = "renesas,r9a09g047-rscif",
> + .data = &of_rsci_scif_data,
> + },
> {
> .compatible = "renesas,r9a09g077-rsci",
> .data = &of_sci_rsci_data,
> @@ -3936,7 +3945,7 @@ static int sci_probe(struct platform_device *dev)
> return ret;
> }
> if (sp->type == PORT_SCIFA || sp->type == PORT_SCIFB ||
> - sp->type == PORT_HSCIF || sp->type == SCI_PORT_RSCI) {
> + sp->type == PORT_HSCIF || sci_is_rsci_fifo_type(sp->type)) {
> ret = device_create_file(&dev->dev, &dev_attr_rx_fifo_timeout);
> if (ret) {
> if (sp->port.fifosize > 1) {
[1] https://lore.kernel.org/all/19a08b75-13ca-45f9-884d-f96602336dfd@kernel.org
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists