<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/spi, branch v3.18-rc5</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/fsl-dspi' and 'spi/fix/pxa2xx' into spi-linus</title>
<updated>2014-11-06T12:58:46+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-11-06T12:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4e72b4278dbc228e4dc453d4dfeca997e521d9af'/>
<id>4e72b4278dbc228e4dc453d4dfeca997e521d9af</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM</title>
<updated>2014-11-06T12:54:00+00:00</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
<email>dbaryshkov@gmail.com</email>
</author>
<published>2014-11-06T11:08:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2b9375b91bef65b837bed61a05fb387159b38ddf'/>
<id>2b9375b91bef65b837bed61a05fb387159b38ddf</id>
<content type='text'>
If PM_RUNTIME is enabled, it is easy to trigger the following backtrace
on pxa2xx hosts:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at /home/lumag/linux/arch/arm/mach-pxa/clock.c:35 clk_disable+0xa0/0xa8()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-00007-g1b3d2ee-dirty #104
[&lt;c000de68&gt;] (unwind_backtrace) from [&lt;c000c078&gt;] (show_stack+0x10/0x14)
[&lt;c000c078&gt;] (show_stack) from [&lt;c001d75c&gt;] (warn_slowpath_common+0x6c/0x8c)
[&lt;c001d75c&gt;] (warn_slowpath_common) from [&lt;c001d818&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;c001d818&gt;] (warn_slowpath_null) from [&lt;c0015e80&gt;] (clk_disable+0xa0/0xa8)
[&lt;c0015e80&gt;] (clk_disable) from [&lt;c02507f8&gt;] (pxa2xx_spi_suspend+0x2c/0x34)
[&lt;c02507f8&gt;] (pxa2xx_spi_suspend) from [&lt;c0200360&gt;] (platform_pm_suspend+0x2c/0x54)
[&lt;c0200360&gt;] (platform_pm_suspend) from [&lt;c0207fec&gt;] (dpm_run_callback.isra.14+0x2c/0x74)
[&lt;c0207fec&gt;] (dpm_run_callback.isra.14) from [&lt;c0209254&gt;] (__device_suspend+0x120/0x2f8)
[&lt;c0209254&gt;] (__device_suspend) from [&lt;c0209a94&gt;] (dpm_suspend+0x50/0x208)
[&lt;c0209a94&gt;] (dpm_suspend) from [&lt;c00455ac&gt;] (suspend_devices_and_enter+0x8c/0x3a0)
[&lt;c00455ac&gt;] (suspend_devices_and_enter) from [&lt;c0045ad4&gt;] (pm_suspend+0x214/0x2a8)
[&lt;c0045ad4&gt;] (pm_suspend) from [&lt;c04b5c34&gt;] (test_suspend+0x14c/0x1dc)
[&lt;c04b5c34&gt;] (test_suspend) from [&lt;c000880c&gt;] (do_one_initcall+0x8c/0x1fc)
[&lt;c000880c&gt;] (do_one_initcall) from [&lt;c04aecfc&gt;] (kernel_init_freeable+0xf4/0x1b4)
[&lt;c04aecfc&gt;] (kernel_init_freeable) from [&lt;c0378078&gt;] (kernel_init+0x8/0xec)
[&lt;c0378078&gt;] (kernel_init) from [&lt;c0009590&gt;] (ret_from_fork+0x14/0x24)
---[ end trace 46524156d8faa4f6 ]---

This happens because suspend function tries to disable a clock that is
already disabled by runtime_suspend callback. Add if
(!pm_runtime_suspended()) checks to suspend/resume path.

Fixes: 7d94a505858 (spi/pxa2xx: add support for runtime PM)
Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Reported-by: Andrea Adami &lt;andrea.adami@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If PM_RUNTIME is enabled, it is easy to trigger the following backtrace
on pxa2xx hosts:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at /home/lumag/linux/arch/arm/mach-pxa/clock.c:35 clk_disable+0xa0/0xa8()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-00007-g1b3d2ee-dirty #104
[&lt;c000de68&gt;] (unwind_backtrace) from [&lt;c000c078&gt;] (show_stack+0x10/0x14)
[&lt;c000c078&gt;] (show_stack) from [&lt;c001d75c&gt;] (warn_slowpath_common+0x6c/0x8c)
[&lt;c001d75c&gt;] (warn_slowpath_common) from [&lt;c001d818&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;c001d818&gt;] (warn_slowpath_null) from [&lt;c0015e80&gt;] (clk_disable+0xa0/0xa8)
[&lt;c0015e80&gt;] (clk_disable) from [&lt;c02507f8&gt;] (pxa2xx_spi_suspend+0x2c/0x34)
[&lt;c02507f8&gt;] (pxa2xx_spi_suspend) from [&lt;c0200360&gt;] (platform_pm_suspend+0x2c/0x54)
[&lt;c0200360&gt;] (platform_pm_suspend) from [&lt;c0207fec&gt;] (dpm_run_callback.isra.14+0x2c/0x74)
[&lt;c0207fec&gt;] (dpm_run_callback.isra.14) from [&lt;c0209254&gt;] (__device_suspend+0x120/0x2f8)
[&lt;c0209254&gt;] (__device_suspend) from [&lt;c0209a94&gt;] (dpm_suspend+0x50/0x208)
[&lt;c0209a94&gt;] (dpm_suspend) from [&lt;c00455ac&gt;] (suspend_devices_and_enter+0x8c/0x3a0)
[&lt;c00455ac&gt;] (suspend_devices_and_enter) from [&lt;c0045ad4&gt;] (pm_suspend+0x214/0x2a8)
[&lt;c0045ad4&gt;] (pm_suspend) from [&lt;c04b5c34&gt;] (test_suspend+0x14c/0x1dc)
[&lt;c04b5c34&gt;] (test_suspend) from [&lt;c000880c&gt;] (do_one_initcall+0x8c/0x1fc)
[&lt;c000880c&gt;] (do_one_initcall) from [&lt;c04aecfc&gt;] (kernel_init_freeable+0xf4/0x1b4)
[&lt;c04aecfc&gt;] (kernel_init_freeable) from [&lt;c0378078&gt;] (kernel_init+0x8/0xec)
[&lt;c0378078&gt;] (kernel_init) from [&lt;c0009590&gt;] (ret_from_fork+0x14/0x24)
---[ end trace 46524156d8faa4f6 ]---

This happens because suspend function tries to disable a clock that is
already disabled by runtime_suspend callback. Add if
(!pm_runtime_suspended()) checks to suspend/resume path.

Fixes: 7d94a505858 (spi/pxa2xx: add support for runtime PM)
Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Reported-by: Andrea Adami &lt;andrea.adami@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: fsl-dspi: Fix CTAR selection</title>
<updated>2014-11-04T10:52:08+00:00</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2014-11-04T08:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5cc7b04740effa5cc0af53f434134b5859d58b73'/>
<id>5cc7b04740effa5cc0af53f434134b5859d58b73</id>
<content type='text'>
There are only 4 CTAR registers (CTAR0 - CTAR3) so we can only use the
lower 2 bits of the chip select to select a CTAR register.
SPI_PUSHR_CTAS used the lower 3 bits which would result in wrong bit values
if the chip selects 4/5 are used. For those chip selects SPI_CTAR even
calculated offsets of non-existing registers.

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are only 4 CTAR registers (CTAR0 - CTAR3) so we can only use the
lower 2 bits of the chip select to select a CTAR register.
SPI_PUSHR_CTAS used the lower 3 bits which would result in wrong bit values
if the chip selects 4/5 are used. For those chip selects SPI_CTAR even
calculated offsets of non-existing registers.

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'spi/fix/dw', 'spi/fix/orion', 'spi/fix/pl022', 'spi/fix/rockchip' and 'spi/fix/spidev' into spi-linus</title>
<updated>2014-10-27T11:26:54+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-10-27T11:26:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1e2cf73e6bff3405cab85ded034f056ca99c375b'/>
<id>1e2cf73e6bff3405cab85ded034f056ca99c375b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: orion: fix potential NULL pointer de-reference</title>
<updated>2014-10-22T10:05:54+00:00</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2014-10-21T05:57:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a2d3635524fe80d9e23623b2fe4a2113045f8d8'/>
<id>9a2d3635524fe80d9e23623b2fe4a2113045f8d8</id>
<content type='text'>
It's possible that the call to of_match_device() (introduced in commit
df59fa7f ["spi: orion: support armada extended baud rates"]) may return
a NULL if there is no match in the device tree (or perhaps no device tree
at all). Check the return pointer and set the local device data to the
lowest common denominator orion device data if it is NULL.

Reported-by: Karl Beldan &lt;karl.beldan@gmail.com&gt;
Signed-off-by: Greg Ungerer &lt;gerg@uclinux.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>
It's possible that the call to of_match_device() (introduced in commit
df59fa7f ["spi: orion: support armada extended baud rates"]) may return
a NULL if there is no match in the device tree (or perhaps no device tree
at all). Check the return pointer and set the local device data to the
lowest common denominator orion device data if it is NULL.

Reported-by: Karl Beldan &lt;karl.beldan@gmail.com&gt;
Signed-off-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma</title>
<updated>2014-10-19T01:11:04+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-10-19T01:11:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=52d589a01d4545ce1dc5c3892bb8c7b55edfe714'/>
<id>52d589a01d4545ce1dc5c3892bb8c7b55edfe714</id>
<content type='text'>
Pull slave-dmaengine updates from Vinod Koul:
 "For dmaengine contributions we have:
   - designware cleanup by Andy
   - my series moving device_control users to dmanegine_xxx APIs for
     later removal of device_control API
   - minor fixes spread over drivers mainly mv_xor, pl330, mmp, imx-sdma
     etc"

* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (60 commits)
  serial: atmel: add missing dmaengine header
  dmaengine: remove FSLDMA_EXTERNAL_START
  dmaengine: freescale: remove FSLDMA_EXTERNAL_START control method
  carma-fpga: move to fsl_dma_external_start()
  carma-fpga: use dmaengine_xxx() API
  dmaengine: freescale: add and export fsl_dma_external_start()
  dmaengine: add dmaengine_prep_dma_sg() helper
  video: mx3fb: use dmaengine_terminate_all() API
  serial: sh-sci: use dmaengine_terminate_all() API
  net: ks8842: use dmaengine_terminate_all() API
  mtd: sh_flctl: use dmaengine_terminate_all() API
  mtd: fsmc_nand: use dmaengine_terminate_all() API
  V4L2: mx3_camer: use dmaengine_pause() API
  dmaengine: coh901318: use dmaengine_terminate_all() API
  pata_arasan_cf: use dmaengine_terminate_all() API
  dmaengine: edma: check for echan-&gt;edesc =&gt; NULL in edma_dma_pause()
  dmaengine: dw: export probe()/remove() and Co to users
  dmaengine: dw: enable and disable controller when needed
  dmaengine: dw: always export dw_dma_{en,dis}able
  dmaengine: dw: introduce dw_dma_on() helper
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull slave-dmaengine updates from Vinod Koul:
 "For dmaengine contributions we have:
   - designware cleanup by Andy
   - my series moving device_control users to dmanegine_xxx APIs for
     later removal of device_control API
   - minor fixes spread over drivers mainly mv_xor, pl330, mmp, imx-sdma
     etc"

* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (60 commits)
  serial: atmel: add missing dmaengine header
  dmaengine: remove FSLDMA_EXTERNAL_START
  dmaengine: freescale: remove FSLDMA_EXTERNAL_START control method
  carma-fpga: move to fsl_dma_external_start()
  carma-fpga: use dmaengine_xxx() API
  dmaengine: freescale: add and export fsl_dma_external_start()
  dmaengine: add dmaengine_prep_dma_sg() helper
  video: mx3fb: use dmaengine_terminate_all() API
  serial: sh-sci: use dmaengine_terminate_all() API
  net: ks8842: use dmaengine_terminate_all() API
  mtd: sh_flctl: use dmaengine_terminate_all() API
  mtd: fsmc_nand: use dmaengine_terminate_all() API
  V4L2: mx3_camer: use dmaengine_pause() API
  dmaengine: coh901318: use dmaengine_terminate_all() API
  pata_arasan_cf: use dmaengine_terminate_all() API
  dmaengine: edma: check for echan-&gt;edesc =&gt; NULL in edma_dma_pause()
  dmaengine: dw: export probe()/remove() and Co to users
  dmaengine: dw: enable and disable controller when needed
  dmaengine: dw: always export dw_dma_{en,dis}able
  dmaengine: dw: introduce dw_dma_on() helper
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: spi controller must be disabled in tx callback too</title>
<updated>2014-10-17T12:29:22+00:00</updated>
<author>
<name>Addy Ke</name>
<email>addy.ke@rock-chips.com</email>
</author>
<published>2014-10-17T01:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2c2bc7489ef330c920fbcee99468aa36a909998a'/>
<id>2c2bc7489ef330c920fbcee99468aa36a909998a</id>
<content type='text'>
Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.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@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: fix bug that cause spi transfer timed out in DMA duplex mode</title>
<updated>2014-10-15T13:05:38+00:00</updated>
<author>
<name>Addy Ke</name>
<email>addy.ke@rock-chips.com</email>
</author>
<published>2014-10-15T11:26:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c28be31b11f56b3bb62490dfe5304eaa2724afc2'/>
<id>c28be31b11f56b3bb62490dfe5304eaa2724afc2</id>
<content type='text'>
In rx mode, dma must be prepared before spi is enabled.
But in tx and tr mode, spi must be enabled first.

Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In rx mode, dma must be prepared before spi is enabled.
But in tx and tr mode, spi must be enabled first.

Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/rockchip: fix bug that case spi can't go as fast as slave request</title>
<updated>2014-10-15T13:05:38+00:00</updated>
<author>
<name>Addy Ke</name>
<email>addy.ke@rock-chips.com</email>
</author>
<published>2014-10-15T11:25:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f9cfd52262d36a55b39d41e2b0faae632ad57e4c'/>
<id>f9cfd52262d36a55b39d41e2b0faae632ad57e4c</id>
<content type='text'>
Because the minimum divisor in rk3x's spi controller is 2,
if spi_clk is less than 2 * sclk_out, we can't get the right divisor.
So we must set spi_clk again to match slave request.

Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because the minimum divisor in rk3x's spi controller is 2,
if spi_clk is less than 2 * sclk_out, we can't get the right divisor.
So we must set spi_clk again to match slave request.

Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: pl022: Fix incorrect dma_unmap_sg</title>
<updated>2014-10-13T11:08:35+00:00</updated>
<author>
<name>Ray Jui</name>
<email>rjui@broadcom.com</email>
</author>
<published>2014-10-09T18:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3ffa6158f002e096d28ede71be4e0ee8ab20baa2'/>
<id>3ffa6158f002e096d28ede71be4e0ee8ab20baa2</id>
<content type='text'>
When mapped RX DMA entries are unmapped in an error condition when DMA
is firstly configured in the driver, the number of TX DMA entries was
passed in, which is incorrect

Signed-off-by: Ray Jui &lt;rjui@broadcom.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When mapped RX DMA entries are unmapped in an error condition when DMA
is firstly configured in the driver, the number of TX DMA entries was
passed in, which is incorrect

Signed-off-by: Ray Jui &lt;rjui@broadcom.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
</feed>
