Re: [PATCH 3/3] serial: 8250_em: Add serial8250_rzv2m_reg_update()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Biju,

On Thu, Feb 9, 2023 at 2:30 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> As per HW manual section 40.6.1, we need to perform FIFO reset + SW
> reset before updating the below registers
>
> FCR[7:5], FCR[3:0], LCR[7][5:0], MCR[6:4], DLL[7:0], DLM[7:0] and
> HCR0[6:5][3:2].
>
> This patch adds serial8250_rzv2m_reg_update() to handle it.
>
> DLL/DLM register can be updated only by setting LCR[7]. So the
> updation of LCR[7] will perform reset for DLL/DLM register changes.
>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/tty/serial/8250/8250_em.c
> +++ b/drivers/tty/serial/8250/8250_em.c

> @@ -111,6 +156,10 @@ static int serial8250_em_probe(struct platform_device *pdev)
>         up.port.uartclk = clk_get_rate(priv->sclk);
>
>         up.port.iotype = UPIO_MEM32;
> +
> +       if (of_device_is_compatible(dev->of_node, "renesas,r9a09g011-uart"))
> +               priv->is_rzv2m = true;

Please add an entry to serial8250_em_dt_ids[] instead, providing
a feature flag in of_device_id.data.

> +
>         up.port.serial_in = serial8250_em_serial_in;
>         up.port.serial_out = serial8250_em_serial_out;
>         up.dl_read = serial8250_em_serial_dl_read;

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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux