public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
Cc: thierry.bultel@linatsea.fr, linux-renesas-soc@vger.kernel.org,
	geert@linux-m68k.org, paul.barker.ct@bp.renesas.com,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH v4 08/13] serial: sh-sci: Introduced function pointers
Date: Mon, 24 Mar 2025 10:25:48 +0100	[thread overview]
Message-ID: <Z-ElHPod77Py1DPH@shikoro> (raw)
In-Reply-To: <20250306152451.2356762-9-thierry.bultel.yh@bp.renesas.com>

[-- Attachment #1: Type: text/plain, Size: 2980 bytes --]

On Thu, Mar 06, 2025 at 04:24:42PM +0100, Thierry Bultel 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>

Okay, the discussion about the general approach convinced me that we can
go this road. I will not do a line-by-line review of these patches, but
just check that it looks good to me in general. This patch here merely
shuffles code around and adds some inderection. If it works, it seems
good enough for me and we can improve on it incrementally:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

That means, though, that testing this series on a variety of SoCs is
especially important and I'd like to get confirmed that you did these
tests on SCI variations which are available on RZ hardware. According to
my research it would be those:

	[SCIx_SCI_REGTYPE]
		/* RZ/Five, RZ/G2UL, RZ/V2L */
		.compatible = "renesas,sci",

	[SCIx_RZ_SCIFA_REGTYPE]
		 /* The "SCIFA" that is in RZ/A2, RZ/G2L and RZ/T1 */
		.compatible = "renesas,scif-r7s9210",
		.compatible = "renesas,scif-r9a07g044",

	[SCIx_RZV2H_SCIF_REGTYPE]
		 /* RZ/V2H */
		.compatible = "renesas,scif-r9a09g057",

	[SCIx_SH4_SCIF_BRG_REGTYPE]
		/* a lot of RZ, too */
		.compatible = "renesas,rcar-gen1-scif",
		.compatible = "renesas,rcar-gen2-scif",
		.compatible = "renesas,rcar-gen3-scif",
		.compatible = "renesas,rcar-gen4-scif",

	[SCIx_HSCIF_REGTYPE]
		/* R-Car Gen2-5 */
		/* a lot of RZ */
		.compatible = "renesas,hscif",

Please double check that I did not make a mistake. I'd think Geert tests
these on in his board farm anyway:

	[SCIx_SH4_SCIF_REGTYPE]
		/* landisk */
		.compatible = "renesas,scif",

	[SCIx_SCIFA_REGTYPE]
		/* R-Car Gen2 */
		.compatible = "renesas,scifa",

	[SCIx_SCIFB_REGTYPE]
		/* R-Car Gen2 */
		.compatible = "renesas,scifb",

	[SCIx_SH2_SCIF_FIFODATA_REGTYPE]
		/* RZ/A1 */
		.compatible = "renesas,scif-r7s72100",

We maybe can get hold of the next board. I will figure this out
internally (not super important for this series, but nice to have):

	[SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE]
	/* SH Ecovec */
	arch/sh/kernel/cpu/sh4a/setup-sh7723.c: .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,

That leaves some older SH boards out of the loop, but I think this is
OK. A quick research didn't let me obtain boards for these anymore.

So far, so good? Comments?

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2025-03-24  9:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250306152451.2356762-1-thierry.bultel.yh@bp.renesas.com>
2025-03-06 15:24 ` [PATCH v4 03/13] dt-bindings: serial: Add compatible for Renesas RZ/T2H SoC in sci Thierry Bultel
2025-03-07 21:45   ` Rob Herring (Arm)
2025-03-06 15:24 ` [PATCH v4 07/13] serial: sh-sci: Fix a comment about SCIFA Thierry Bultel
2025-03-18 21:50   ` Wolfram Sang
2025-03-06 15:24 ` [PATCH v4 08/13] serial: sh-sci: Introduced function pointers Thierry Bultel
2025-03-14 11:05   ` Geert Uytterhoeven
2025-03-17  9:55     ` Wolfram Sang
2025-03-17 10:27       ` Paul Barker
2025-03-18 21:45         ` Wolfram Sang
2025-03-24  9:25   ` Wolfram Sang [this message]
2025-03-24 10:02     ` Geert Uytterhoeven
2025-03-06 15:24 ` [PATCH v4 09/13] serial: sh-sci: Introduced sci_of_data Thierry Bultel
2025-03-24  9:37   ` Wolfram Sang
2025-03-24 10:03   ` Geert Uytterhoeven
2025-03-06 15:24 ` [PATCH v4 10/13] serial: sh-sci: Add support for RZ/T2H SCI Thierry Bultel
2025-03-24  9:43   ` Wolfram Sang
2025-03-24 12:49     ` Thierry Bultel
2025-03-24 21:56       ` Wolfram Sang
2025-03-25  6:29         ` Biju Das
2025-03-25  7:51           ` Wolfram Sang
2025-03-25 10:49             ` Thierry Bultel
2025-03-25 11:06               ` Wolfram Sang
2025-03-25 16:24               ` 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=Z-ElHPod77Py1DPH@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=paul.barker.ct@bp.renesas.com \
    --cc=thierry.bultel.yh@bp.renesas.com \
    --cc=thierry.bultel@linatsea.fr \
    /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