Re: [PATCH v2 1/3] serial: sh-sci: Allow for compressed SCIF address space

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

 



Hi Chris,

On Wed, Jul 25, 2018 at 4:39 PM Chris Brandt <chris.brandt@xxxxxxxxxxx> wrote:
> Some devices with SCIx_SH4_SCIF_REGTYPE have no space between registers.
> Use the register area size to determine the spacing between register.
>
> Signed-off-by: Chris Brandt <chris.brandt@xxxxxxxxxxx>

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

> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c

> @@ -2869,6 +2869,10 @@ static int sci_init_single(struct platform_device *dev,
>                         port->regshift = 1;
>         }
>
> +       if (p->regtype == SCIx_SH4_SCIF_REGTYPE)
> +               if (sci_port->reg_size >= 0x20)
> +                       port->regshift = 1;
> +

So you have to be careful not to round up the reg size in DT to the next
power of two (0x20), like you did for RZ/A1 (64 is used there).

Note that while no SH board file uses SCIx_SH4_SCIF_REGTYPE, it is the
default reg type for PORT_SCIF, so some board files may be affected.
However, they all set reg_size to 0x100, so this change should be OK.

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]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux