serial: sh-sci: Replace hardcoded values in SCxSR_*_CLEAR macros
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 30 Apr 2015 16:21:30 +0000 (18:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2015 17:06:38 +0000 (19:06 +0200)
commit2922598cd913dc1a3fc0d2e77463075b80ea769f
tree8d22cb93cbb6ac86f97f178e8869463af8df1fd6
parentd94a0a3857987c76c37a8095977fe554799ab69d
serial: sh-sci: Replace hardcoded values in SCxSR_*_CLEAR macros

Add the missing overrun error bit in SCxSR on SCIFA/SCIFB and SCIF on
SH7705/SH7720/SH7721.
Document what the corresponding bit(s) on plain SCIF are used for.
Sort the components of SCIF_DEFAULT_ERROR_MASK by reverse definition
order.

Replace the hardcoded values in the SCxSR_*_CLEAR macros by proper
defines. Use bit masks (negations of sets of bits) to make it more
obvious which bits are being cleared.

Assembler output (on sh) was compared before and after this commit:
  - For the first branch of the big "#if defined(...) || ..." construct,
    the code has changed slightly, as 32-bit bitmasks can be loaded in a
    single instruction, unlike the old large 16-bit constants (the SCxSR
    register is 16 bit, so we don't care about the top 16 bits),
  - For the second branch, the generated code is identical.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.h
This page took 0.025643 seconds and 5 git commands to generate.