From: Paul Barker <paul.barker.ct@bp.renesas.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Thierry Bultel <thierry.bultel.yh@bp.renesas.com>,
thierry.bultel@linatsea.fr, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Ulrich Hecht <uli@fpond.eu>,
Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v4 08/13] serial: sh-sci: Introduced function pointers
Date: Mon, 17 Mar 2025 10:27:32 +0000 [thread overview]
Message-ID: <999cb080-ea61-45e5-9ea0-356fb8bc4639@bp.renesas.com> (raw)
In-Reply-To: <Z9fxfV9jAGJ51fcn@shikoro>
[-- Attachment #1.1.1: Type: text/plain, Size: 2490 bytes --]
On 17/03/2025 09:55, Wolfram Sang wrote:
> Hi all,
>
> sorry for missing this series so far and thanks to Geert for pulling me
> into the loop.
>
>> While most rough edges have been polished by now (thanks!), and the
>> driver seems to still work on a variety of platforms, I am still
>> worried about the impact of this change:
>> - Maintainability and future bug fixing?
>
> I hate to see development work going to waste, yet I have to say I am
> also concerned about the maintainability of this driver after this very
> intrusive changeset. The driver is already quite complex. Adding another
> layer of complexity (function pointers) will make proper bugfixing for
> all supported instances quite harder, I'd think.
>
> Has it been discussed to have this as a separate driver? Were there
> reasons against it? This is really an open question. Maybe it is
> justified to do it like this if we have reasons for it.
>
> Seeing that SCI core needs 800+ lines changed and we still have a
> seperate driver with 460 lines driver, I do wonder if copying the logic
> from SCI core to a seperate driver would make sense. I am aware that the
> core has currently 3500+ lines currently. I'd estimate it would shrink
> quite a bit when copying because you won't need to handle all the
> differences to other SCI entries.
>
> Again, this is not a request to follow my suggestion, it is an open
> question to make sure all paths have been considered.
Hi Geert, Wolfram,
Thierry is out of the office this week so we can follow this up next
week, but I do want to give some input in the meantime.
We discussed both approaches internally and did an initial
proof-of-concept of a separate driver. The result was over 1,000 lines
of code copy-pasted from the existing sh-sci driver into the new driver,
which is generally something maintainers want us to avoid doing. The
trade off here is whether we want a single more complex driver, or two
copies of much of the code so that bugfixes/improvements to the common
sections in the future need to be duplicated.
The RZ/V2H and RZ/G3E have interfaces of both the existing sh-sci
register layout ("SCIF" ports in RZ/V2H & RZ/G3E manual) and the RZ/T2H
style register layout ("RSCI" ports in RZ/V2H manual, "SCI" ports in
RZ/G3E manual), so keeping things closely aligned as we move forward
will be beneficial. I expect that this will be easier with a combined
driver.
Thanks,
--
Paul Barker
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3577 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2025-03-17 10:27 UTC|newest]
Thread overview: 34+ 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 01/13] dt-bindings: soc: Add Renesas RZ/T2H (R9A09G077) SoC Thierry Bultel
2025-03-07 21:40 ` Rob Herring (Arm)
2025-03-06 15:24 ` [PATCH v4 02/13] dt-bindings: clock: Add cpg for the Renesas RZ/T2H SoC Thierry Bultel
2025-03-07 21:43 ` Rob Herring
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 04/13] soc: renesas: Add RZ/T2H (R9A09G077) config option Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 05/13] clk: renesas: Pass sub struct of cpg_mssr_priv to cpg_clk_register Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 06/13] clk: renesas: Add support for R9A09G077 SoC Thierry Bultel
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 [this message]
2025-03-18 21:45 ` Wolfram Sang
2025-03-24 9:25 ` Wolfram Sang
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
2025-03-06 15:24 ` [PATCH v4 11/13] arm64: dts: renesas: Add initial support for renesas RZ/T2H SoC Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 12/13] arm64: dts: renesas: Add initial support for renesas RZ/T2H eval board Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 13/13] arm64: defconfig: Enable Renesas RZ/T2H serial SCI Thierry Bultel
2025-03-24 9:44 ` Wolfram Sang
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=999cb080-ea61-45e5-9ea0-356fb8bc4639@bp.renesas.com \
--to=paul.barker.ct@bp.renesas.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=linux-sh@vger.kernel.org \
--cc=thierry.bultel.yh@bp.renesas.com \
--cc=thierry.bultel@linatsea.fr \
--cc=uli@fpond.eu \
--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