Re: [PATCH] serial: sh-sci: Save and restore SCDL and SCCKS
From: Geert Uytterhoeven
Date: Wed Feb 19 2025 - 10:57:30 EST
Hi Claudiu,
On Wed, 19 Feb 2025 at 16:04, Claudiu Beznea <claudiu.beznea@xxxxxxxxx> wrote:
> On 19.02.2025 16:24, Geert Uytterhoeven wrote:
> > On (H)SCIF with a Baud Rate Generator for External Clock (BRG), there
> > are multiple ways to configure the requested serial speed. If firmware
> > uses a different method than Linux, and if any debug info is printed
> > after the Bit Rate Register (SCBRR) is restored, but before termios is
> > reconfigured (which configures the alternative method), the system may
> > lock-up during resume.
> >
> > Fix this by saving and restoring the contents of the Frequency Division
> > (DL) and Clock Select (CKS) registers as well.
>
> Keeping the thinks RZ/G3S focused (as proposed in the first versions of
> this support), I missed there might be other registers on other IP variants.
Indeed. I forgot to mention I didn't check other registers...
> Reviewing the full list of registers from [1], maybe the HSSRR and
> SCPCR should be saved/restored as well?
Agreed. Late restoring these is probably never fatal, though.
> [1]
> https://elixir.bootlin.com/linux/v6.13.3/source/drivers/tty/serial/sh-sci.h#L14
>
> >
> > Fixes: 22a6984c5b5df8ea ("serial: sh-sci: Update the suspend/resume support")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> For this patch:
> Tested-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
> Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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