serial: sh-sci: Introduced sci_of_data
authorThierry Bultel <thierry.bultel.yh@bp.renesas.com>
Thu, 3 Apr 2025 21:29:11 +0000 (23:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 14:56:32 +0000 (16:56 +0200)
commit043806bc9dbc6597dd15e6ca9220ae2746425f2f
treee2c7599acf050d1fcfcaf1aec41122a97f9a19ec
parent21fc3d6b45ba42c471fb718ce922d1f9abe26238
serial: sh-sci: Introduced sci_of_data

The aim here is to provide an easier support to more different SCI
controllers, like the RZ/T2H one.

The existing .data field of_sci_match is changed to a structure containing
all what that can be statically initialized, and avoid a call to
'sci_probe_regmap', in both 'sci_init_single', and 'early_console_setup'.

'sci_probe_regmap' is now assumed to be called in the only case where the
device description is from a board file instead of a dts.

In this way, there is no need to patch 'sci_probe_regmap' for adding new
SCI type, and also, the specific sci_port_params for a new SCI type can be
provided by an external file.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
Link: https://lore.kernel.org/r/20250403212919.1137670-10-thierry.bultel.yh@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci-common.h
drivers/tty/serial/sh-sci.c