[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdWEQue1eqX7AE+WQ1OrdpMNVU7PXfprYaSGHQV0ofpB4A@mail.gmail.com>
Date: Thu, 6 Mar 2025 11:17:10 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Thierry Bultel <thierry.bultel.yh@...renesas.com>
Cc: thierry.bultel@...atsea.fr, linux-renesas-soc@...r.kernel.org,
paul.barker.ct@...renesas.com, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org
Subject: Re: [PATCH v3 09/13] serial: sh-sci: Introduced sci_of_data
Hi Thierry,
On Wed, 26 Feb 2025 at 14:10, Thierry Bultel
<thierry.bultel.yh@...renesas.com> wrote:
> 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.
>
> Signed-off-by: Thierry Bultel <thierry.bultel.yh@...renesas.com>
> Reviewed-by: Paul Barker <paul.barker.ct@...renesas.com>
Thanks for your patch!
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -3250,12 +3247,17 @@ static struct console early_serial_console = {
> static int sci_probe_earlyprintk(struct platform_device *pdev)
> {
> const struct plat_sci_port *cfg = dev_get_platdata(&pdev->dev);
> + struct sci_port *sp = pdev->id;
"sp = &sci_ports[pdev->id]" makes it going again on QEMU RTS7751R2D.
>
> if (early_serial_console.data)
> return -EEXIST;
>
> early_serial_console.index = pdev->id;
>
> + sp->params = sci_probe_regmap(cfg, sp);
> + if (!sp->params)
> + return -ENODEV;
> +
> sci_init_single(pdev, &sci_ports[pdev->id], pdev->id, cfg, true);
Here you can reuse sp.
>
> if (!strstr(early_serial_buf, "keep"))
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
Powered by blists - more mailing lists