[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <999cb080-ea61-45e5-9ea0-356fb8bc4639@bp.renesas.com>
Date: Mon, 17 Mar 2025 10:27:32 +0000
From: Paul Barker <paul.barker.ct@...renesas.com>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Thierry Bultel <thierry.bultel.yh@...renesas.com>,
thierry.bultel@...atsea.fr, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
Ulrich Hecht <uli@...nd.eu>, Linux-sh list <linux-sh@...r.kernel.org>
Subject: Re: [PATCH v4 08/13] serial: sh-sci: Introduced function pointers
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
Download attachment "OpenPGP_0x27F4B3459F002257.asc" of type "application/pgp-keys" (3521 bytes)
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)
Powered by blists - more mailing lists