<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/spi, branch v3.18</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=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-11-26T19:05:25Z</updated>
<entry>
<title>Merge remote-tracking branches 'spi/fix/dw' and 'spi/fix/sirf' into spi-linus</title>
<updated>2014-11-26T19:05:25Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-11-26T19:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec058615f1fbc03837ab048b1bb7291370b46cef'/>
<id>urn:sha1:ec058615f1fbc03837ab048b1bb7291370b46cef</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'spi/fix/dma' into spi-linus</title>
<updated>2014-11-26T19:05:25Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-11-26T19:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13616c71334a6024149a36d51db4bb000273da00'/>
<id>urn:sha1:13616c71334a6024149a36d51db4bb000273da00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>spi: sirf: fix word width configuration</title>
<updated>2014-11-18T14:43:22Z</updated>
<author>
<name>Qipan Li</name>
<email>Qipan.Li@csr.com</email>
</author>
<published>2014-11-17T15:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c4b19a07dddda3ba35a2eb9b4134d485908e2f5'/>
<id>urn:sha1:9c4b19a07dddda3ba35a2eb9b4134d485908e2f5</id>
<content type='text'>
commit 8c328a262f ("spi: sirf: Avoid duplicate code in various
bits_per_word cases") is wrong in setting data width register of
fifo is not right, it should use sspi-&gt;word_width &gt;&gt; 1 to set
related bits. According to hardware spec, the mapping between
register value and data width:
0 - byte
1 - WORD
2 - DWORD

Fixes: 8c328a262f ("spi: sirf: Avoid duplicate code in various bits_per_word cases") is wrong in setting data width register of
Signed-off-by: Qipan Li &lt;Qipan.Li@csr.com&gt;
Signed-off-by: Barry Song &lt;Baohua.Song@csr.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>spi: Fix mapping from vmalloc-ed buffer to scatter list</title>
<updated>2014-11-17T10:40:10Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.wolfsonmicro.com</email>
</author>
<published>2014-11-17T09:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1aefbdd050e1fb15e92bcaf34d95b17ea952097'/>
<id>urn:sha1:c1aefbdd050e1fb15e92bcaf34d95b17ea952097</id>
<content type='text'>
We can only use page_address on memory that has been mapped using kmap,
when the buffer passed to the SPI has been allocated by vmalloc the page
has not necessarily been mapped through kmap. This means sometimes
page_address will return NULL causing the pointer we pass to sg_set_buf
to be invalid.

As we only call page_address so that we can pass a virtual address to
sg_set_buf which will then immediately call virt_to_page on it, fix this
by calling sg_set_page directly rather then relying on the sg_set_buf
helper.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>spi: dw: Fix dynamic speed change.</title>
<updated>2014-11-07T10:14:59Z</updated>
<author>
<name>Thor Thayer</name>
<email>tthayer@opensource.altera.com</email>
</author>
<published>2014-11-06T19:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a8727e69778683495058852f783eeda141a754e'/>
<id>urn:sha1:0a8727e69778683495058852f783eeda141a754e</id>
<content type='text'>
An IOCTL call that calls spi_setup() and then dw_spi_setup() will
overwrite the persisted last transfer speed. On each transfer, the
SPI speed is compared to the last transfer speed to determine if the
clock divider registers need to be updated (did the speed change?).
This bug was observed with the spidev driver using spi-config to
update the max transfer speed.

This fix: Don't overwrite the persisted last transaction clock speed
when updating the SPI parameters in dw_spi_setup(). On the next
transaction, the new speed won't match the persisted last speed
and the hardware registers will be updated.
On initialization, the persisted last transaction clock
speed will be 0 but will be updated after the first SPI
transaction.

Move zeroed clock divider check into clock change test because
chip-&gt;clk_div is zero on startup and would cause a divide-by-zero
error. The calculation was wrong as well (can't support odd #).

Reported-by: Vlastimil Setka &lt;setka@vsis.cz&gt;
Signed-off-by: Vlastimil Setka &lt;setka@vsis.cz&gt;
Signed-off-by: Thor Thayer &lt;tthayer@opensource.altera.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'spi/fix/fsl-dspi' and 'spi/fix/pxa2xx' into spi-linus</title>
<updated>2014-11-06T12:58:46Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-11-06T12:58:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e72b4278dbc228e4dc453d4dfeca997e521d9af'/>
<id>urn:sha1:4e72b4278dbc228e4dc453d4dfeca997e521d9af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM</title>
<updated>2014-11-06T12:54:00Z</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
<email>dbaryshkov@gmail.com</email>
</author>
<published>2014-11-06T11:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b9375b91bef65b837bed61a05fb387159b38ddf'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>spi: fsl-dspi: Fix CTAR selection</title>
<updated>2014-11-04T10:52:08Z</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2014-11-04T08:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cc7b04740effa5cc0af53f434134b5859d58b73'/>
<id>urn:sha1: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>
</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:54Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-10-27T11:26:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e2cf73e6bff3405cab85ded034f056ca99c375b'/>
<id>urn:sha1:1e2cf73e6bff3405cab85ded034f056ca99c375b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>spi: orion: fix potential NULL pointer de-reference</title>
<updated>2014-10-22T10:05:54Z</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@uclinux.org</email>
</author>
<published>2014-10-21T05:57:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a2d3635524fe80d9e23623b2fe4a2113045f8d8'/>
<id>urn:sha1: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>
</entry>
</feed>
