Re: [PATCH v2] serial: sh-sci: byte allocated register support

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

 



CC gregkh, linux-serial

On Sun, Jul 22, 2018 at 3:02 PM Yoshinori Sato
<ysato@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> H8/300 SCI registers allocated byte address.
> It must support to the case where shift count is 0.
>
> Changes v2.
> more simply code.
>
> Signed-off-by: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -2863,10 +2863,12 @@ static int sci_init_single(struct platform_device *dev,
>         port->fifosize          = sci_port->params->fifosize;
>
>         if (port->type == PORT_SCI) {
> -               if (sci_port->reg_size >= 0x20)
> -                       port->regshift = 2;
> -               else
> -                       port->regshift = 1;
> +               /*
> +                * reg_size < 0x10: BYTE aligned (scale factor=1).
> +                * reg_size >= 0x10 and < 0x20: WORD aligned (scale factor=2).
> +                * reg_size >= 0x20: DWORD aligned (scale factor=4).
> +                */
> +               port->regshift = sci_port->reg_size >> 4;
>         }
>
>         /*

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
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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