All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 09/14] serial: sh-sci: Introduced function pointers
Date: Tue, 11 Feb 2025 11:58:09 +0100	[thread overview]
Message-ID: <Z6stNMTldzILRhBK@superbuilder> (raw)
In-Reply-To: <CAMuHMdVD1dLP53V_zOhxpqazDdPDVafJ6iohY8u6WPQrmYH5Sw@mail.gmail.com>

On Mon, Feb 10, 2025 at 03:45:02PM +0100, Geert Uytterhoeven wrote:
> Hi Thierry,
> 

Hi Geert,

> On Wed, 29 Jan 2025 at 18:03, Thierry Bultel
> <thierry.bultel.yh@bp.renesas.com> wrote:
> > The aim here is to prepare support for new sci controllers like
> > the T2H/RSCI whose registers are too much different for being
> > handled in common code.
> >
> > This named serial controller also has 32 bits register,
> > so some return types had to be changed.
> >
> > The needed generic functions are no longer static, with prototypes
> > defined in sh-sci-common.h so that they can be used from specific
> > implementation in a separate file, to keep this driver as little
> > changed as possible.
> >
> > For doing so, a set of 'ops' is added to struct sci_port.
> >
> > Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
> 
> Thanks for your patch!
> 
> I can't say I am super-enthusiastic about this approach.
> The SCI variant in RZ/T2 seems to differ a lot from the already
> supported SCI, SCIF, SCIFA, SCIFB, and HSCIF variants. The latter
> are very similar, but usually have just more features/registers, and
> further differ in a few different register offsets and bit locations.
> If you compare the RZ/T2 SCI block diagram with the SH7751 SCI block
> diagram (or even the R-Car SCIF block diagram), the most striking
> similarity is that both have a baud rate generator that can divide
> Pclk by 1, 4, 16, or 64 ;-)
> So perhaps you're better off adding a completely new driver?
> 

The origin of this work is the non-mainline 'rz-sci.c' from renesas BSP,
which is a actually separate driver, but that we considered 'similar enough'
(a lot of duplicated lines) to be integrated in sh-sci with some work.

The number of places where to add specific code for the new port type 
were however a concern in terms of non-regression tests and future
evolutions.
So the idea was basically to change it once in the most possible modular
way, so that coming features and/or bug fixes keep specific to rzsci.

I am looking forward to getting more minds about that approach, which
seemed the less intrusive, keeping as much code in common as possible.

> What do other people think?
> Thanks!
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

  parent reply	other threads:[~2025-02-11 10:58 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29 16:37 [PATCH 00/14] add initial support for Renesas RZ/T2H SoC Thierry Bultel
2025-01-29 16:37 ` [PATCH 01/14] dt-bindings: soc: Document Renesas RZ/T2H (R9A09G077) SoC Thierry Bultel
2025-01-29 18:28   ` Krzysztof Kozlowski
2025-02-10 13:14     ` Thierry Bultel
2025-02-10 13:34       ` Krzysztof Kozlowski
2025-02-10 12:52   ` Geert Uytterhoeven
2025-02-10 13:32     ` Thierry Bultel
2025-02-10 13:56       ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 02/14] dt-bindings: serial: Document sci bindings for the Renesas RZ/T2H (a.k.a r9a09g077) SoC Thierry Bultel
2025-01-29 18:31   ` Krzysztof Kozlowski
2025-01-30  8:09     ` Krzysztof Kozlowski
2025-01-30  8:11   ` Krzysztof Kozlowski
2025-02-10 13:14   ` Geert Uytterhoeven
2025-02-10 13:19     ` Biju Das
2025-02-10 14:15       ` Geert Uytterhoeven
2025-02-10 14:26         ` Biju Das
2025-02-10 14:35           ` Geert Uytterhoeven
2025-02-10 14:42             ` Biju Das
2025-02-10 14:46               ` Biju Das
2025-02-10 14:48                 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 03/14] dt-bindings: soc: Document the Renesas RZ/T2H Evaluation board for the R9A09G077 SoC Thierry Bultel
2025-01-29 18:31   ` Krzysztof Kozlowski
2025-01-30  8:11   ` Krzysztof Kozlowski
2025-02-10 13:21   ` Geert Uytterhoeven
2025-02-10 14:02     ` Thierry Bultel
2025-02-10 14:10       ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 04/14] dt-bindings: clock: Document cpg bindings for the Renesas RZ/T2H SoC Thierry Bultel
2025-01-29 18:34   ` Krzysztof Kozlowski
2025-02-10 13:39   ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 05/14] soc: renesas: Add RZ/T2H (R9A09G077) config option Thierry Bultel
2025-02-10 13:40   ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 06/14] clk: renesas: Add support for RZ/T2H family clock Thierry Bultel
2025-02-04 16:14   ` Paul Barker
2025-02-06 15:02     ` Thierry Bultel
2025-02-10 14:06   ` Geert Uytterhoeven
2025-02-10 14:53     ` Thierry Bultel
2025-02-10 16:14       ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 07/14] clk: renesas: Add support for R9A09G077 SoC Thierry Bultel
2025-02-04 16:44   ` Paul Barker
2025-01-29 16:37 ` [PATCH 08/14] serial: sh-sci: Fix a comment about SCIFA Thierry Bultel
2025-01-30  8:38   ` Geert Uytterhoeven
2025-02-04 16:51   ` Paul Barker
2025-01-29 16:37 ` [PATCH 09/14] serial: sh-sci: Introduced function pointers Thierry Bultel
2025-01-30  8:38   ` Geert Uytterhoeven
2025-02-04 18:04   ` Paul Barker
2025-02-07 14:05     ` Thierry Bultel
2025-02-10 14:45   ` Geert Uytterhoeven
2025-02-10 15:36     ` Geert Uytterhoeven
2025-02-11 10:58     ` Thierry Bultel [this message]
2025-01-29 16:37 ` [PATCH 10/14] serial: sh-sci: Introduced sci_of_data Thierry Bultel
2025-01-30  8:39   ` Geert Uytterhoeven
2025-02-10 15:48   ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 11/14] serial: sh-sci: Add support for RZ/T2H SCI Thierry Bultel
2025-02-10 15:30   ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 12/14] arm64: dts: renesas: Add initial support for renesas RZ/T2H SoC Thierry Bultel
2025-01-29 18:36   ` Krzysztof Kozlowski
2025-02-10 15:52   ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 13/14] arm64: dts: renesas: Add initial support for renesas RZ/T2H eval board Thierry Bultel
2025-01-29 18:37   ` Krzysztof Kozlowski
2025-02-10 15:54   ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 14/14] defconfig: Enable RZ/T2H Soc and RZ_SCI Thierry Bultel
2025-01-29 18:40   ` Krzysztof Kozlowski
2025-01-30  8:40   ` Geert Uytterhoeven

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=Z6stNMTldzILRhBK@superbuilder \
    --to=thierry.bultel.yh@bp.renesas.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.