<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/serial/sh-sci.h, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-12-17T10:18:44Z</updated>
<entry>
<title>serial: sh-sci: Add BRG register definitions</title>
<updated>2015-12-17T10:18:44Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-11-12T12:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8bbd6b2923279f1c9c74d59638b38a1eace78e8'/>
<id>urn:sha1:b8bbd6b2923279f1c9c74d59638b38a1eace78e8</id>
<content type='text'>
Add register definitions for the Baud Rate Generator for External Clock
(BRG), as found in some SCIF and in HSCIF, including a new regtype for
the "SH-4(A)"-derived SCIF variant with BRG.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Correct SCIF_ERROR_CLEAR for plain SCIF</title>
<updated>2015-10-04T16:33:48Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-08-21T18:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5da0f468745bc2dd992f49511bae5183efadfa05'/>
<id>urn:sha1:5da0f468745bc2dd992f49511bae5183efadfa05</id>
<content type='text'>
SCIF_ERROR_CLEAR includes SCIFA_ORER, which exists only on SCIFA/SCIFB
and SCIF on sh7705/sh7720/sh7721.

To fix this:
  1. Remove SCIFA_ORER from the definition of SCIF_ERROR_CLEAR,
  2. During initialization, store the error clear mask to use,
     incorporating the overrun bit only if it applies to the SCxSR
     register.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Prevent compiler warnings on 64-bit</title>
<updated>2015-10-04T16:33:48Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-08-21T18:02:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a9efeca613a8fe5281d7c91f5c8c9ea46f2312f6'/>
<id>urn:sha1:a9efeca613a8fe5281d7c91f5c8c9ea46f2312f6</id>
<content type='text'>
Expressions involving "BIT(...)" create values of type "long", which is
64-bit on 64-bit.  Hence "~BIT(...)" no longer fits in 32-bit, which
will cause future compiler warnings when assigning to 32-bit variables:

    drivers/tty/serial/sh-sci.c: In function 'sci_init_single':
    drivers/tty/serial/sh-sci.h:58:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     #define SCI_ERROR_CLEAR ~(SCI_RESERVED | SCI_PER | SCI_FER | SCI_ORER)
			     ^
    drivers/tty/serial/sh-sci.c:2325:27: note: in expansion of macro 'SCI_ERROR_CLEAR'
       sci_port-&gt;error_clear = SCI_ERROR_CLEAR;

As these values are (at most) 32-bit register values anyway, cast them
to "u32" at the definition level to prevent such compiler warnings.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Replace buggy big #ifdef by runtime logic</title>
<updated>2015-10-04T16:33:48Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-08-21T18:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1b5b43ffb84945cbdc5cbdb993d3195c7e77cbb'/>
<id>urn:sha1:a1b5b43ffb84945cbdc5cbdb993d3195c7e77cbb</id>
<content type='text'>
The #ifdef logic to clear SCxSR bits using RMW on SCIFA/SCIFB and SCIF
variants with some SCIFA features (sh7705/SH7720/sh7721) has several
drawbacks:
  - It wasn't updated for newer R-Mobile variants (APE6),
  - It doesn't correctly handle SoCs with both SCIF and SCIFA/B (e.g.
    R-Car Gen2, but also legacy sh7723/sh7724),
  - It doesn't play well with ARM multi-platform kernels: on R-Car Gen2,
    SCIF/SCIFA/SCIFB/HSCIF were handled differently, depending on
    whether r8a7740 or sh73a0 support was enabled or not,

Replace the #ifdef logic by runtime logic to fix this.

SCIFA/SCIFB and SCIF on sh7705/sh7720/sh7721 use RMW to clear error
bits, other variants use plain stores, as before.

Note that this changes behavior for SCIFA on sh7723/sh7724 (these SoCs
have both SCIF and SCIFA), which didn't use RMW before.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Replace hardcoded overrun bit values</title>
<updated>2015-05-10T17:06:39Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-04-30T16:21:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75c249fd7cb9097c58e44bc82f61b1f72ef79b3a'/>
<id>urn:sha1:75c249fd7cb9097c58e44bc82f61b1f72ef79b3a</id>
<content type='text'>
Add the missing overrun bit definition for (H)SCIF.
Replace overrun_bit by overrun_mask, so we can use the existing
defines instead of hardcoded values.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Replace hardcoded values in SCxSR_*_CLEAR macros</title>
<updated>2015-05-10T17:06:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-04-30T16:21:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2922598cd913dc1a3fc0d2e77463075b80ea769f'/>
<id>urn:sha1:2922598cd913dc1a3fc0d2e77463075b80ea769f</id>
<content type='text'>
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 &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Standardize on using the BIT() macro to define register bits</title>
<updated>2015-05-10T17:06:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-04-30T16:21:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d94a0a3857987c76c37a8095977fe554799ab69d'/>
<id>urn:sha1:d94a0a3857987c76c37a8095977fe554799ab69d</id>
<content type='text'>
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Document remaining FIFO Control Register bits</title>
<updated>2015-05-10T17:06:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-04-30T16:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31f90796c66876ea1894ea93e394b264e69dfdfc'/>
<id>urn:sha1:31f90796c66876ea1894ea93e394b264e69dfdfc</id>
<content type='text'>
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Add SCIFA/B SCPCR register definitions</title>
<updated>2015-05-10T17:06:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-04-30T16:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c097abc33f70f0d59618b779cbca3df358c88a57'/>
<id>urn:sha1:c097abc33f70f0d59618b779cbca3df358c88a57</id>
<content type='text'>
Add the register definitions for the Serial Port Control and Data
Registers on SCIFA/SCIFB, which are needed for RTS/CTS pin control.

Extracted from patches by Magnus Damm &lt;damm+renesas@opensource.se&gt;.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Add (H)SCIF RTS/CTS pin data register bit definitions</title>
<updated>2015-05-10T17:06:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-04-30T16:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76735e9d558bb81b8c4c5246572b0fca27bfff4d'/>
<id>urn:sha1:76735e9d558bb81b8c4c5246572b0fca27bfff4d</id>
<content type='text'>
Add the missing register bit definitions to set the RTS pin and read the
CTS pin on (H)SCIF.

Extracted from patches by Magnus Damm &lt;damm+renesas@opensource.se&gt;.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
