<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/tty/serial/imx.c, branch v4.3</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Revert "serial: imx: remove unbalanced clk_prepare"</title>
<updated>2015-10-04T17:51:42+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-08-18T15:43:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0c727a42043f79db210cdde0366f9137b9c6bf5a'/>
<id>0c727a42043f79db210cdde0366f9137b9c6bf5a</id>
<content type='text'>
This reverts commit 9e7b399d6528eac33a6fbfceb2b92af209c3454d.

Commit ("9e7b399d6528ea") causes the following warning and sometimes
also hangs the system:

------------[ cut here ]------------
 WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:868 mutex_trylock+0x20c/0x22c()
 DEBUG_LOCKS_WARN_ON(in_interrupt())
 Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.2.0-rc7-next-20150818-00001-g14418a6 #4
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
Backtrace:
[&lt;80012f08&gt;] (dump_backtrace) from [&lt;800130a4&gt;] (show_stack+0x18/0x1c)
r6:00000364 r5:00000000 r4:00000000 r3:00000000
[&lt;8001308c&gt;] (show_stack) from [&lt;807902b8&gt;] (dump_stack+0x88/0xa4)
[&lt;80790230&gt;] (dump_stack) from [&lt;8002a604&gt;] (warn_slowpath_common+0x80/0xbc)
r5:807945c4 r4:80ab3b50
[&lt;8002a584&gt;] (warn_slowpath_common) from [&lt;8002a6e4&gt;] (warn_slowpath_fmt+0x38/0x40)
r8:00000000 r7:8131100c r6:8054c3cc r5:8131300c r4:80b0a570
[&lt;8002a6b0&gt;] (warn_slowpath_fmt) from [&lt;807945c4&gt;] (mutex_trylock+0x20c/0x22c)
r3:8095d0d8 r2:8095ab28
[&lt;807943b8&gt;] (mutex_trylock) from [&lt;8054c3cc&gt;] (clk_prepare_lock+0x14/0xf4)
r7:8131100c r6:be3f0c80 r5:00000037 r4:be3f0c80
[&lt;8054c3b8&gt;] (clk_prepare_lock) from [&lt;8054dbfc&gt;] (clk_prepare+0x18/0x30)
r5:00000037 r4:be3f0c80
[&lt;8054dbe4&gt;] (clk_prepare) from [&lt;8036a600&gt;] (imx_console_write+0x30/0x244)
r4:812d0bc8 r3:8132b9a4

To reproduce the problem we only need to let the board idle for something
like 30 seconds.

Tested on a imx6q-sabresd.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9e7b399d6528eac33a6fbfceb2b92af209c3454d.

Commit ("9e7b399d6528ea") causes the following warning and sometimes
also hangs the system:

------------[ cut here ]------------
 WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:868 mutex_trylock+0x20c/0x22c()
 DEBUG_LOCKS_WARN_ON(in_interrupt())
 Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.2.0-rc7-next-20150818-00001-g14418a6 #4
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
Backtrace:
[&lt;80012f08&gt;] (dump_backtrace) from [&lt;800130a4&gt;] (show_stack+0x18/0x1c)
r6:00000364 r5:00000000 r4:00000000 r3:00000000
[&lt;8001308c&gt;] (show_stack) from [&lt;807902b8&gt;] (dump_stack+0x88/0xa4)
[&lt;80790230&gt;] (dump_stack) from [&lt;8002a604&gt;] (warn_slowpath_common+0x80/0xbc)
r5:807945c4 r4:80ab3b50
[&lt;8002a584&gt;] (warn_slowpath_common) from [&lt;8002a6e4&gt;] (warn_slowpath_fmt+0x38/0x40)
r8:00000000 r7:8131100c r6:8054c3cc r5:8131300c r4:80b0a570
[&lt;8002a6b0&gt;] (warn_slowpath_fmt) from [&lt;807945c4&gt;] (mutex_trylock+0x20c/0x22c)
r3:8095d0d8 r2:8095ab28
[&lt;807943b8&gt;] (mutex_trylock) from [&lt;8054c3cc&gt;] (clk_prepare_lock+0x14/0xf4)
r7:8131100c r6:be3f0c80 r5:00000037 r4:be3f0c80
[&lt;8054c3b8&gt;] (clk_prepare_lock) from [&lt;8054dbfc&gt;] (clk_prepare+0x18/0x30)
r5:00000037 r4:be3f0c80
[&lt;8054dbe4&gt;] (clk_prepare) from [&lt;8036a600&gt;] (imx_console_write+0x30/0x244)
r4:812d0bc8 r3:8132b9a4

To reproduce the problem we only need to let the board idle for something
like 30 seconds.

Tested on a imx6q-sabresd.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: imx: save and restore context in the suspend path</title>
<updated>2015-08-15T00:23:25+00:00</updated>
<author>
<name>Eduardo Valentin</name>
<email>edubezval@gmail.com</email>
</author>
<published>2015-08-11T17:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c868cbb7e5c6d3c74b8d38c7c356444f2c807c28'/>
<id>c868cbb7e5c6d3c74b8d38c7c356444f2c807c28</id>
<content type='text'>
This change teaches the imx serial driver to save its
context and restore it across suspend and resume path.
To do so, it introduces serial_imx_restore_context()
and serial_imx_save_context() functions. They use
a shadow set of registers to save key registers
and restore them accordingly. These functions can
be reused on other situations, when the device
context is lost.

Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change teaches the imx serial driver to save its
context and restore it across suspend and resume path.
To do so, it introduces serial_imx_restore_context()
and serial_imx_save_context() functions. They use
a shadow set of registers to save key registers
and restore them accordingly. These functions can
be reused on other situations, when the device
context is lost.

Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: imx: allow waking up on RTSD</title>
<updated>2015-08-15T00:23:25+00:00</updated>
<author>
<name>Eduardo Valentin</name>
<email>edubezval@gmail.com</email>
</author>
<published>2015-08-11T17:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bc85734b126f813ba46265c2d3a84c8839cb2e54'/>
<id>bc85734b126f813ba46265c2d3a84c8839cb2e54</id>
<content type='text'>
This patch sets RTSDEN bit when going into idle (Stop mode).
We add the RTSDEN for the case RTS is sent from
the remote connection. This way we allow the system
to wakeup when RTS is received.

Cc: Fabio Stevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch sets RTSDEN bit when going into idle (Stop mode).
We add the RTSDEN for the case RTS is sent from
the remote connection. This way we allow the system
to wakeup when RTS is received.

Cc: Fabio Stevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: imx: introduce serial_imx_enable_wakeup()</title>
<updated>2015-08-15T00:23:25+00:00</updated>
<author>
<name>Eduardo Valentin</name>
<email>edubezval@gmail.com</email>
</author>
<published>2015-08-11T17:21:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=189550b8644ef5d00d3b744f7fd423cce2d7c9ec'/>
<id>189550b8644ef5d00d3b744f7fd423cce2d7c9ec</id>
<content type='text'>
This change is a code reorganization. Here we introduce
serial_imx_enable_wakeup() helper function to do
the job of configuring and preparing wakeup sources
on imx serial device. The idea is to allow other
parts of the code to call this function whenever
the device is known to go to idle.

Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change is a code reorganization. Here we introduce
serial_imx_enable_wakeup() helper function to do
the job of configuring and preparing wakeup sources
on imx serial device. The idea is to allow other
parts of the code to call this function whenever
the device is known to go to idle.

Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: imx: remove unbalanced clk_prepare</title>
<updated>2015-08-15T00:23:25+00:00</updated>
<author>
<name>Eduardo Valentin</name>
<email>edubezval@gmail.com</email>
</author>
<published>2015-08-11T17:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9e7b399d6528eac33a6fbfceb2b92af209c3454d'/>
<id>9e7b399d6528eac33a6fbfceb2b92af209c3454d</id>
<content type='text'>
The current code attempts to prepare clk_per and clk_ipg
before using the device. However, the result is an extra
prepare call on each clock. Here is the output of uart
clocks (only uart enabled and used as console):

$  grep uart /sys/kernel/debug/clk/clk_summary
 uart_serial           1            2    80000000          0 0
       uart           1            2    66000000          0 0

This patch balances the calls of prepares. The result is:

$  grep uart /sys/kernel/debug/clk/clk_summary
 uart_serial           1            1    80000000          0 0
       uart           1            1    66000000          0 0

Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code attempts to prepare clk_per and clk_ipg
before using the device. However, the result is an extra
prepare call on each clock. Here is the output of uart
clocks (only uart enabled and used as console):

$  grep uart /sys/kernel/debug/clk/clk_summary
 uart_serial           1            2    80000000          0 0
       uart           1            2    66000000          0 0

This patch balances the calls of prepares. The result is:

$  grep uart /sys/kernel/debug/clk/clk_summary
 uart_serial           1            1    80000000          0 0
       uart           1            1    66000000          0 0

Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: linux-serial@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Serial: imx: add dev_pm_ops to support suspend to ram/disk</title>
<updated>2015-08-03T22:51:19+00:00</updated>
<author>
<name>Shenwei Wang</name>
<email>shenwei.wang@freescale.com</email>
</author>
<published>2015-07-30T15:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=90bb6bd385638f37d30dcc7342a62aff80089def'/>
<id>90bb6bd385638f37d30dcc7342a62aff80089def</id>
<content type='text'>
When system goes into low power states like SUSPEND_MEM and
HIBERNATION, the hardware IP block may be powered off to reduce
the power consumption. This power down may cause problems on
some imx platforms, because the hardware settings are reset to
its power on default values which may differ from the ones when
it power off. This patch added the dev_pm_ops and implemented
two callbacks: suspend_noirq and resume_noirq, which will save
the necessory hardware parameters right before power down and
recover them before system uses the hardware.

Because added the dev_pm_ops, the old suspend/resume callbacks
under platform_driver will not be called any more. Changed their
prototypes and moved those two callbacks into dev_pm_ops too.

Signed-off-by: Shenwei Wang &lt;shenwei.wang@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When system goes into low power states like SUSPEND_MEM and
HIBERNATION, the hardware IP block may be powered off to reduce
the power consumption. This power down may cause problems on
some imx platforms, because the hardware settings are reset to
its power on default values which may differ from the ones when
it power off. This patch added the dev_pm_ops and implemented
two callbacks: suspend_noirq and resume_noirq, which will save
the necessory hardware parameters right before power down and
recover them before system uses the hardware.

Because added the dev_pm_ops, the old suspend/resume callbacks
under platform_driver will not be called any more. Changed their
prototypes and moved those two callbacks into dev_pm_ops too.

Signed-off-by: Shenwei Wang &lt;shenwei.wang@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "tty: serial: imx.c: Reset UART before activating interrupts"</title>
<updated>2015-07-27T18:26:56+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-07-27T18:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=458e2c82c5fbfbc431598636c05bdb21feb7056f'/>
<id>458e2c82c5fbfbc431598636c05bdb21feb7056f</id>
<content type='text'>
This reverts commit e95044ba4fee93f5ea8a1a24b2d921e148503833.

Commit e95044ba4fee93 ("tty: serial: imx.c: Reset UART before activating
interrupts") terribly messes up with the console on mx6 boards, so
let's revert it.

Reported-by: kernelci.org bot &lt;bot@kernelci.org&gt;
Cc: David Jander &lt;david@protonic.nl&gt;
Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e95044ba4fee93f5ea8a1a24b2d921e148503833.

Commit e95044ba4fee93 ("tty: serial: imx.c: Reset UART before activating
interrupts") terribly messes up with the console on mx6 boards, so
let's revert it.

Reported-by: kernelci.org bot &lt;bot@kernelci.org&gt;
Cc: David Jander &lt;david@protonic.nl&gt;
Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 4.2-rc4 into tty-next</title>
<updated>2015-07-27T18:12:39+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2015-07-27T18:12:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=92311e46ecf2298d87f175c8449ab4d8c400a38e'/>
<id>92311e46ecf2298d87f175c8449ab4d8c400a38e</id>
<content type='text'>
Other serial driver work wants to build on patches now in 4.2-rc4 so
merge the branch so this can properly happen.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Other serial driver work wants to build on patches now in 4.2-rc4 so
merge the branch so this can properly happen.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "serial: imx: initialized DMA w/o HW flow enabled"</title>
<updated>2015-07-24T00:40:14+00:00</updated>
<author>
<name>David Jander</name>
<email>david@protonic.nl</email>
</author>
<published>2015-06-26T06:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=907eda32a36fcdb979bdb91ea097abb3dd2c23c9'/>
<id>907eda32a36fcdb979bdb91ea097abb3dd2c23c9</id>
<content type='text'>
This reverts commit 068500e08dc87ea9a453cc4a500cf3ab28d0f936.

According to some tests, SDMA support is broken at least for i.MX6 without
HW flow control. Different forms of data-corruption appear either with
the ROM firmware for the SDMA controller as well as when loading Freescale
provided SDMA firmware versions 1.1 or 3.1.

Signed-off-by: David Jander &lt;david@protonic.nl&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 068500e08dc87ea9a453cc4a500cf3ab28d0f936.

According to some tests, SDMA support is broken at least for i.MX6 without
HW flow control. Different forms of data-corruption appear either with
the ROM firmware for the SDMA controller as well as when loading Freescale
provided SDMA firmware versions 1.1 or 3.1.

Signed-off-by: David Jander &lt;david@protonic.nl&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: serial: imx.c: Reset UART before activating interrupts</title>
<updated>2015-07-24T00:39:08+00:00</updated>
<author>
<name>David Jander</name>
<email>david@protonic.nl</email>
</author>
<published>2015-07-02T14:29:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e95044ba4fee93f5ea8a1a24b2d921e148503833'/>
<id>e95044ba4fee93f5ea8a1a24b2d921e148503833</id>
<content type='text'>
If the UART has been in use before this driver was loaded, IRQs might be
active and get fired as soon as we set the handler, which will crash
in the spin_lock_irqsave(&amp;sport-&gt;port.lock, flags) because port.lock is
not initialized until the port is added at the end of probe.

Signed-off-by: David Jander &lt;david@protonic.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the UART has been in use before this driver was loaded, IRQs might be
active and get fired as soon as we set the handler, which will crash
in the spin_lock_irqsave(&amp;sport-&gt;port.lock, flags) because port.lock is
not initialized until the port is added at the end of probe.

Signed-off-by: David Jander &lt;david@protonic.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
