<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/serial/sh-sci.c, branch v4.7</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.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-03-08T00:11:14Z</updated>
<entry>
<title>serial: sh-sci: Remove redundant instances of EARLYCON_DECLARE()</title>
<updated>2016-03-08T00:11:14Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-02-15T12:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a7a6eb6453a0b128ab312442cff0c15a5ab1e3b'/>
<id>urn:sha1:9a7a6eb6453a0b128ab312442cff0c15a5ab1e3b</id>
<content type='text'>
As of commit 2eaa790989e03900 ("earlycon: Use common framework for
earlycon declarations") it is no longer needer to specify both
EARLYCON_DECLARE() and OF_EARLYCON_DECLARE().

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Add support for SCIFA/SCIFB variable sampling rates</title>
<updated>2016-02-07T06:54:55Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-01-04T13:45:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=92a0574867f3329ca285b51adcf09ed3ee42e7a0'/>
<id>urn:sha1:92a0574867f3329ca285b51adcf09ed3ee42e7a0</id>
<content type='text'>
Add support for sparse variable sampling rates on SCIFA and SCIFB.
According to the datasheet, sampling rate 1/5 needs a small quirk to
avoid corrupting the first byte received.

This increases the range and accuracy of supported baud rates.
E.g. on r8a7791/koelsch:
  - Supports now 134, 150, and standard 500000-4000000 bps,
  - Perfect match for 134, 150, 500000, 1000000, 2000000, and 4000000
    bps,
  - Accuracy has increased for most standard bps 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: Use a bitmask to indicate supported sampling rates</title>
<updated>2016-02-07T06:54:55Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-01-04T13:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69eee8e9c876eb412282a3b45d998e989d3a8e93'/>
<id>urn:sha1:69eee8e9c876eb412282a3b45d998e989d3a8e93</id>
<content type='text'>
Replace the single sampling rate and special handling for HSCIF's
variable sampling rates by a bitmask and a custom iterator.
This prepares for the advent of SCIFA/SCIFB's sparse variable sampling
rates.

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: Use premultiplier to handle half sampling rate</title>
<updated>2016-02-07T06:54:55Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-01-04T13:45:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b5c0c08f5e895fb92c1d1d5f905c68eca1df5c0'/>
<id>urn:sha1:7b5c0c08f5e895fb92c1d1d5f905c68eca1df5c0</id>
<content type='text'>
On SCIx variants different from HSCIF, the bit rate is equal to the
sampling clock rate divided by half the sampling rate. Currently this is
handled by dividing the sampling rate by two, which was OK as it was
always even.

Replace halving the sampling rate by premultiplying the base clock
frequency by 2, to accommodate odd sampling rates on SCIFA/SCIFB later.

Replace the shift value in the BRG divider calculation by a
premultiplication of the base clock frequency too, for consistency.

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: Preserve SCIFA/SCIFB bit rate config for serial console</title>
<updated>2016-02-07T06:54:55Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-01-04T13:45:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a964abe1ef1cfbe82d0ae832d70c7750d673728'/>
<id>urn:sha1:3a964abe1ef1cfbe82d0ae832d70c7750d673728</id>
<content type='text'>
SCIFA and SCIFB have additional bit rate config bits in the Serial Mode
Register.  Don't touch them when using the port as a serial console, as
we rely on the boot loader to have configured the serial port config.

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 more Serial Mode Register documentation</title>
<updated>2016-02-07T06:54:55Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-01-04T13:45:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=95ee05c7adb0b5b7d55cc991b015a62efba21ba5'/>
<id>urn:sha1:95ee05c7adb0b5b7d55cc991b015a62efba21ba5</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 CONFIG_SERIAL_EARLYCON support</title>
<updated>2016-02-07T06:51:04Z</updated>
<author>
<name>Yoshinori Sato</name>
<email>ysato@users.sourceforge.jp</email>
</author>
<published>2015-12-24T10:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b0cced19ab15c9ebbfbc6c4c0d932863e18fbe5'/>
<id>urn:sha1:0b0cced19ab15c9ebbfbc6c4c0d932863e18fbe5</id>
<content type='text'>
"earlyprintk" is architecture specific option.
General "earlycon" option support is much better.

Signed-off-by: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
[uli: preserve other SCSCR bits when asserting RE and TE]
Signed-off-by: Ulrich Hecht &lt;ulrich.hecht+renesas@gmail.com&gt;
[geert: rewording, #ifdef rework]
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: Remove cpufreq notifier to fix crash/deadlock</title>
<updated>2016-01-08T05:08:05Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-01-05T18:36:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff1cab374ad98f4b9f408525ca9c08992b4ed784'/>
<id>urn:sha1:ff1cab374ad98f4b9f408525ca9c08992b4ed784</id>
<content type='text'>
The BSP team noticed that there is spin/mutex lock issue on sh-sci when
CPUFREQ is used.  The issue is that the notifier function may call
mutex_lock() while the spinlock is held, which can lead to a BUG().
This may happen if CPUFREQ is changed while another CPU calls
clk_get_rate().

Taking the spinlock was added to the notifier function in commit
e552de2413edad1a ("sh-sci: add platform device private data"), to
protect the list of serial ports against modification during traversal.
At that time the Common Clock Framework didn't exist yet, and
clk_get_rate() just returned clk-&gt;rate without taking a mutex.
Note that since commit d535a2305facf9b4 ("serial: sh-sci: Require a
device per port mapping."), there's no longer a list of serial ports to
traverse, and taking the spinlock became superfluous.

To fix the issue, just remove the cpufreq notifier:
  1. The notifier doesn't work correctly: all it does is update stored
     clock rates; it does not update the divider in the hardware.
     The divider will only be updated when calling sci_set_termios().
     I believe this was broken back in 2004, when the old
     drivers/char/sh-sci.c driver (where the notifier did update the
     divider) was replaced by drivers/serial/sh-sci.c (where the
     notifier just updated port-&gt;uartclk).
     Cfr. full-history-linux commits 6f8deaef2e9675d9 ("[PATCH] sh: port
     sh-sci driver to the new API") and 3f73fe878dc9210a ("[PATCH]
     Remove old sh-sci driver").
  2. On modern SoCs, the sh-sci parent clock rate is no longer related
     to the CPU clock rate anyway, so using a cpufreq notifier is
     futile.

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>Merge branch 'scif-clk-sck-brg-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into tty-next</title>
<updated>2016-01-08T05:04:46Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2016-01-08T05:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f658f21c65d1d8a8c93d1a6505e86c285bb7897e'/>
<id>urn:sha1:f658f21c65d1d8a8c93d1a6505e86c285bb7897e</id>
<content type='text'>
Geert writes:

Summary:
  - Clean up the naming of clocks in the sh-sci driver and its DT bindings,
  - Add support for the optional external clock on (H)SCI(F), where this pin
    can serve as a clock input,
  - Add support for the optional clock sources for the Baud Rate
    Generator for External Clock (BRG), as found on some SCIF variants
    and on HSCIF.
</content>
</entry>
<entry>
<title>serial: sh-sci: Drop the sci_fck clock fallback</title>
<updated>2015-12-17T10:19:12Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2015-09-14T12:14:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=192d367f218d0cd94aa9b5059992e4aa19ec5b36'/>
<id>urn:sha1:192d367f218d0cd94aa9b5059992e4aa19ec5b36</id>
<content type='text'>
All platforms that used to define an sci_fck clock have now switched to
the fck name. Remove the fallback code.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Acked-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
