Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Hugo Villeneuve <hugo@hugovil.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	wsa+renesas <wsa+renesas@sang-engineering.com>,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
	Nam Cao <namcao@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	biju.das.au <biju.das.au@gmail.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 12/19] serial: sh-sci: Add support for RZ/G3E RSCI clks
Date: Tue, 28 Oct 2025 11:37:42 -0400	[thread overview]
Message-ID: <20251028113742.7ad84146ecb9a2c7f2c6b4e9@hugovil.com> (raw)
In-Reply-To: <TY3PR01MB113462A9E19F5AF62DB26CA5E86FDA@TY3PR01MB11346.jpnprd01.prod.outlook.com>

Hi Biju,

On Tue, 28 Oct 2025 15:08:50 +0000
Biju Das <biju.das.jz@bp.renesas.com> wrote:

> Hi Hugo,
> 
> Thanks for the feedback.
> 
> > -----Original Message-----
> > From: Hugo Villeneuve <hugo@hugovil.com>
> > Sent: 28 October 2025 14:51
> > Subject: Re: [PATCH 12/19] serial: sh-sci: Add support for RZ/G3E RSCI clks
> > 
> > Hi Biju,
> > 
> > On Mon, 27 Oct 2025 15:45:59 +0000
> > Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > 
> > > RZ/G3E RSCI has 5 module clocks. Add support for these clocks.
> > 
> > In "[PATCH 03/19] dt-bindings: serial: renesas,rsci: Document RZ/G3E support", you mention that
> > "...RZ/G3E has 6 clocks...", and here 5?
> 
> 5 module clocks + 1 external clock = 6 clocks.

Ok, maybe add this precision in your cover letter (and possibly
other commits) to remove any ambiguity...

> 
> I just omitted external clock here as it is available on both G3E and T2H.
> 
> Cheers,
> Biju
> 
> > 
> > 
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > ---
> > >  drivers/tty/serial/sh-sci-common.h |  3 +++
> > >  drivers/tty/serial/sh-sci.c        | 14 ++++++++++++++
> > >  2 files changed, 17 insertions(+)
> > >
> > > diff --git a/drivers/tty/serial/sh-sci-common.h
> > > b/drivers/tty/serial/sh-sci-common.h
> > > index ef1d94ae8b5c..f730ff9add60 100644
> > > --- a/drivers/tty/serial/sh-sci-common.h
> > > +++ b/drivers/tty/serial/sh-sci-common.h
> > > @@ -17,6 +17,9 @@ enum SCI_CLKS {
> > >  	SCI_SCK,		/* Optional External Clock */
> > >  	SCI_BRG_INT,		/* Optional BRG Internal Clock Source */
> > >  	SCI_SCIF_CLK,		/* Optional BRG External Clock Source */
> > > +	SCI_FCK_DIV64,		/* Optional Functional Clock frequency-divided by 64 */
> > > +	SCI_FCK_DIV16,		/* Optional Functional Clock frequency-divided by 16 */
> > > +	SCI_FCK_DIV4,		/* Optional Functional Clock frequency-divided by 4 */
> > 
> > I see 6 clocks here?
> > 
> > >  	SCI_NUM_CLKS
> > >  };
> > >
> > > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> > > index 5f5913410df9..d45bdda2b6c1 100644
> > > --- a/drivers/tty/serial/sh-sci.c
> > > +++ b/drivers/tty/serial/sh-sci.c
> > > @@ -2994,6 +2994,9 @@ static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
> > >  		[SCI_SCK] = "sck",
> > >  		[SCI_BRG_INT] = "brg_int",
> > >  		[SCI_SCIF_CLK] = "scif_clk",
> > > +		[SCI_FCK_DIV64] = "tclk_div64",
> > > +		[SCI_FCK_DIV16] = "tclk_div16",
> > > +		[SCI_FCK_DIV4] = "tclk_div4",
> > >  	};
> > >  	struct clk *clk;
> > >  	unsigned int i;
> > > @@ -3003,6 +3006,9 @@ static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
> > >  	} else if (sci_port->type == SCI_PORT_RSCI) {
> > >  		clk_names[SCI_FCK] = "operation";
> > >  		clk_names[SCI_BRG_INT] = "bus";
> > > +	} else if (sci_port->type == RSCI_PORT_SCI || sci_port->type == RSCI_PORT_SCIF) {
> > > +		clk_names[SCI_FCK] = "tclk";
> > > +		clk_names[SCI_BRG_INT] = "bus";
> > >  	}
> > >
> > >  	for (i = 0; i < SCI_NUM_CLKS; i++) { @@ -3018,6 +3024,14 @@ static
> > > int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
> > >  					     name);
> > >  		}
> > >
> > > +		if (!clk && (sci_port->type == RSCI_PORT_SCI ||
> > > +			     sci_port->type == RSCI_PORT_SCIF) &&
> > > +		    (i == SCI_FCK || i == SCI_BRG_INT || i == SCI_FCK_DIV64 ||
> > > +		     i == SCI_FCK_DIV16 || i == SCI_FCK_DIV4)) {
> > > +			return dev_err_probe(dev, -ENODEV, "failed to get %s\n",
> > > +					     name);
> > > +		}
> > > +
> > >  		if (!clk && i == SCI_FCK) {
> > >  			/*
> > >  			 * Not all SH platforms declare a clock lookup entry
> > > --
> > > 2.43.0
> > >
> > >
> > 
> > --
> > Hugo Villeneuve
> 


-- 
Hugo Villeneuve

  reply	other threads:[~2025-10-28 15:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27 15:45 [PATCH 00/19] Add RZ/G3E RSCI support Biju Das
2025-10-27 15:45 ` [PATCH 02/19] dt-bindings: serial: rsci: Drop "uart-has-rtscts: false" Biju Das
2025-10-28 19:28   ` Conor Dooley
2025-10-28 19:39     ` Biju Das
2025-10-28 19:50       ` Conor Dooley
2025-10-28 20:27         ` Biju Das
2025-10-27 15:45 ` [PATCH 03/19] dt-bindings: serial: renesas,rsci: Document RZ/G3E support Biju Das
2025-10-28 19:30   ` Conor Dooley
2025-10-28 19:41     ` Biju Das
2025-10-28 19:51       ` Conor Dooley
2025-10-28 20:26         ` Biju Das
2025-10-29 17:20           ` Conor Dooley
2025-10-27 15:45 ` [PATCH 04/19] serial: sh-sci: Fix deadlock during RSCI FIFO overrun error Biju Das
2025-10-28  8:40   ` Greg Kroah-Hartman
2025-10-28  9:08     ` Biju Das
2025-10-27 15:45 ` [PATCH 05/19] serial: rsci: Drop rsci_clear_CFC() Biju Das
2025-10-27 15:45 ` [PATCH 06/19] serial: sh-sci: Drop extra line Biju Das
2025-10-28 14:35   ` Hugo Villeneuve
2025-10-30 14:43     ` Biju Das
2025-10-27 15:45 ` [PATCH 07/19] serial: rsci: Drop unused macro DCR Biju Das
2025-10-27 15:45 ` [PATCH 08/19] serial: rsci: Drop unused TDR register Biju Das
2025-10-27 15:45 ` [PATCH 09/19] serial: sh-sci: Use devm_reset_control_array_get_exclusive() Biju Das
2025-10-27 15:45 ` [PATCH 10/19] serial: sh-sci: Add RSCI_PORT_{SCI,SCIF} port IDs Biju Das
2025-10-27 15:45 ` [PATCH 11/19] serial: sh-sci: Add sci_is_rsci_type() Biju Das
2025-10-27 15:45 ` [PATCH 12/19] serial: sh-sci: Add support for RZ/G3E RSCI clks Biju Das
2025-10-28 14:51   ` Hugo Villeneuve
2025-10-28 15:08     ` Biju Das
2025-10-28 15:37       ` Hugo Villeneuve [this message]
2025-10-27 15:46 ` [PATCH 13/19] serial: sh-sci: Make sci_scbrr_calc() public Biju Das
2025-10-27 15:46 ` [PATCH 14/19] serial: sh-sci: Add finish_console_write() callback Biju Das
2025-10-27 15:46 ` [PATCH 15/19] serial: sh-sci: Add support for RZ/G3E RSCI SCIF Biju Das
2025-10-28 15:22   ` Hugo Villeneuve
2025-10-27 15:46 ` [PATCH 16/19] serial: sh-sci: Add support for RZ/G3E RSCI SCI Biju Das
2025-10-28  8:41 ` [PATCH 00/19] Add RZ/G3E RSCI support Greg Kroah-Hartman
2025-10-28  9:12   ` Biju Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251028113742.7ad84146ecb9a2c7f2c6b4e9@hugovil.com \
    --to=hugo@hugovil.com \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=namcao@linutronix.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox