<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/spi/spi-rockchip.c, branch v3.17</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge remote-tracking branches 'spi/fix/davinci', 'spi/fix/dw', 'spi/fix/fsl', 'spi/fix/pl022', 'spi/fix/rockchip' and 'spi/fix/sirf' into spi-linus</title>
<updated>2014-09-16T23:20:19+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-09-16T23:20:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94b0955ddd1ea4ea1089a282dd8058765fffe937'/>
<id>94b0955ddd1ea4ea1089a282dd8058765fffe937</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: Don't warn if SPI is busy but disabled</title>
<updated>2014-09-04T22:54:11+00:00</updated>
<author>
<name>Doug Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2014-09-03T20:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=62946172c81578477fcbb26478aebaa31353488d'/>
<id>62946172c81578477fcbb26478aebaa31353488d</id>
<content type='text'>
The reference manual from Rockchip claims this about the BSF (SPI Busy
Flag):
* 0 - SPI is idle or disabled
* 1 - SPI is actively transferring data

The above doesn't quite appear to be true.  Specifically I found the
busy bit set when SPI was disabled.  Let's change the WARN_ON() so we
only check the busy bit if the controller was enabled.

Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reference manual from Rockchip claims this about the BSF (SPI Busy
Flag):
* 0 - SPI is idle or disabled
* 1 - SPI is actively transferring data

The above doesn't quite appear to be true.  Specifically I found the
busy bit set when SPI was disabled.  Let's change the WARN_ON() so we
only check the busy bit if the controller was enabled.

Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: Fix the wait_for_idle() timeout</title>
<updated>2014-09-04T22:54:11+00:00</updated>
<author>
<name>Doug Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2014-09-03T20:44:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=64bc0110f1ec905b1676b5ef60c1cc5b1799e1b6'/>
<id>64bc0110f1ec905b1676b5ef60c1cc5b1799e1b6</id>
<content type='text'>
The wait_for_idle() could get unlucky and timeout too quickly.
Specifically, the old calculation was effectively:
  timeout = jiffies + 1;
  if (jiffies &gt;= timeout) print warning;

From the above it should be obvious that if jiffies ticks in just the
wrong place then we'll have an effective timeout of 0.

Fix this by effectively changing the above "&gt;=" to a "&gt;".  That gives
us an extra jiffy to finish.

Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The wait_for_idle() could get unlucky and timeout too quickly.
Specifically, the old calculation was effectively:
  timeout = jiffies + 1;
  if (jiffies &gt;= timeout) print warning;

From the above it should be obvious that if jiffies ticks in just the
wrong place then we'll have an effective timeout of 0.

Fix this by effectively changing the above "&gt;=" to a "&gt;".  That gives
us an extra jiffy to finish.

Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: Avoid accidentally turning off the clock</title>
<updated>2014-08-29T11:07:38+00:00</updated>
<author>
<name>Doug Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2014-08-28T23:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d1d150d7d775db1dccb4dc4676075d456dea392'/>
<id>5d1d150d7d775db1dccb4dc4676075d456dea392</id>
<content type='text'>
If our client is requesting a clock that is above the maximum clock
then the following division will result in 0:
  rs-&gt;max_freq / rs-&gt;speed

We'll then program 0 into the SPI_BAUDR register.  The Rockchip TRM
says: "If the value is 0, the serial output clock (sclk_out) is
disabled."

It's much better to end up with the fastest possible clock rather than
a clock that is off, so enforce a minimum value.

Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If our client is requesting a clock that is above the maximum clock
then the following division will result in 0:
  rs-&gt;max_freq / rs-&gt;speed

We'll then program 0 into the SPI_BAUDR register.  The Rockchip TRM
says: "If the value is 0, the serial output clock (sclk_out) is
disabled."

It's much better to end up with the fastest possible clock rather than
a clock that is off, so enforce a minimum value.

Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: fixup incorrect dma direction setting</title>
<updated>2014-08-20T15:31:17+00:00</updated>
<author>
<name>Addy Ke</name>
<email>addy.ke@rock-chips.com</email>
</author>
<published>2014-08-20T03:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0ac7a4904ae1a73ae4c2c18ff6a5dd2b7e03254c'/>
<id>0ac7a4904ae1a73ae4c2c18ff6a5dd2b7e03254c</id>
<content type='text'>
Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: fix error return code in rockchip_spi_probe()</title>
<updated>2014-07-25T17:25:59+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2014-07-20T14:02:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=db7e8d90cae5d0840ad1444b693ec43dbfab339f'/>
<id>db7e8d90cae5d0840ad1444b693ec43dbfab339f</id>
<content type='text'>
Fix to return -EINVAL from the error handling case instead of 0 when
failed to get fifo length.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix to return -EINVAL from the error handling case instead of 0 when
failed to get fifo length.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: remove redundant dev_err call in rockchip_spi_probe()</title>
<updated>2014-07-25T17:25:59+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2014-07-20T14:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4e6fafee0289222105c40ddd7293da19b043122c'/>
<id>4e6fafee0289222105c40ddd7293da19b043122c</id>
<content type='text'>
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: remove duplicated include from spi-rockchip.c</title>
<updated>2014-07-25T17:25:58+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2014-07-20T14:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c4950143fcc0da75b89c11365a500c0879431d81'/>
<id>c4950143fcc0da75b89c11365a500c0879431d81</id>
<content type='text'>
Remove duplicated include.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove duplicated include.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: add compatible strings for RK3188 and RK3288</title>
<updated>2014-07-11T12:59:58+00:00</updated>
<author>
<name>Addy Ke</name>
<email>addy.ke@rockchip.com</email>
</author>
<published>2014-07-11T02:09:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b839b785182497da67374db216b28213ee7bf1b4'/>
<id>b839b785182497da67374db216b28213ee7bf1b4</id>
<content type='text'>
Suggested-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Addy Ke &lt;addy.ke@rockchip.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Addy Ke &lt;addy.ke@rockchip.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: master-&gt;mode_bits: remove SPI_CS_HIGH bit</title>
<updated>2014-07-11T12:59:57+00:00</updated>
<author>
<name>Addy Ke</name>
<email>addy.ke@rockchip.com</email>
</author>
<published>2014-07-11T02:08:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ee780997648814d6f1e18b05234867bbd0b43ca9'/>
<id>ee780997648814d6f1e18b05234867bbd0b43ca9</id>
<content type='text'>
Suggested-by: Jonas Gorski &lt;jogo@openwrt.org&gt;
Signed-off-by: Addy Ke &lt;addy.ke@rockchip.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested-by: Jonas Gorski &lt;jogo@openwrt.org&gt;
Signed-off-by: Addy Ke &lt;addy.ke@rockchip.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
