]> git.karo-electronics.de Git - karo-tx-linux.git/commit
serial: sh-sci: Compute the regshift value for SCI ports
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 11 Jan 2017 14:43:40 +0000 (16:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 13:17:05 +0000 (14:17 +0100)
commitdfc80387aefb78161f83732804c6d01c89c24595
tree1576a2c29d8c81842c676c6c6e9095e45e3c9f91
parent97ed9790c514066bfae67f22e084b505ed5af436
serial: sh-sci: Compute the regshift value for SCI ports

SCI instances found in SH SoCs have different spacing between registers
depending on the SoC. The platform data contains a regshift field that
tells the driver by how many bits to shift the register offset to
compute its address. We can compute the regshift value automatically
based on the memory resource size, there's no need to pass the value
through platform data.

Fix the sh7750 SCI and sh7760 SIM port memory resources length to ensure
proper computation of the regshift value.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sh/kernel/cpu/sh3/setup-sh770x.c
arch/sh/kernel/cpu/sh4/setup-sh7750.c
arch/sh/kernel/cpu/sh4/setup-sh7760.c
drivers/tty/serial/sh-sci.c
include/linux/serial_sci.h