<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/spi, branch v3.19</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.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-02-04T20:57:31Z</updated>
<entry>
<title>Merge remote-tracking branches 'spi/fix/fsl-dspi' and 'spi/fix/imx' into spi-linus</title>
<updated>2015-02-04T20:57:31Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2015-02-04T20:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d426a842b0c203c182ec2658efc4282ef1eb80be'/>
<id>urn:sha1:d426a842b0c203c182ec2658efc4282ef1eb80be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>spi: imx: use pio mode for i.mx6dl</title>
<updated>2015-02-03T12:17:01Z</updated>
<author>
<name>Robin Gong</name>
<email>b38343@freescale.com</email>
</author>
<published>2015-02-03T02:25:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a02bb401f8ae264be782ee57d98bdd99f14c8022'/>
<id>urn:sha1:a02bb401f8ae264be782ee57d98bdd99f14c8022</id>
<content type='text'>
For TKT238285 hardware issue which may cause txfifo store data twice can only
be caught on i.mx6dl, we use pio mode instead of DMA mode on i.mx6dl.

Fixes: f62caccd12c17e4 (spi: spi-imx: add DMA support)
Signed-off-by: Robin Gong &lt;b38343@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>spi: spi-fsl-dspi: Remove usage of devm_kzalloc</title>
<updated>2015-01-27T19:52:02Z</updated>
<author>
<name>Bhuvanchandra DV</name>
<email>bhuvanchandra.dv@toradex.com</email>
</author>
<published>2015-01-27T10:57:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=973fbce69ed8e79b5fe3ad19cfecb581a7ef8048'/>
<id>urn:sha1:973fbce69ed8e79b5fe3ad19cfecb581a7ef8048</id>
<content type='text'>
devm_* API was supposed to be used only in probe function call.
Memory is allocated at 'probe' and free automatically at 'remove'.
Usage of devm_* functions outside probe sometimes leads to memory leak.
Avoid using devm_kzalloc in dspi_setup_transfer and use kzalloc instead.
Also add the dspi_cleanup function to free the controller data upon
cleanup.

Acked-by: Stefan Agner &lt;stefan@agner.ch&gt;
Signed-off-by: Bhuvanchandra DV &lt;bhuvanchandra.dv@toradex.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/msiof' and 'spi/fix/pxa2xx' into spi-linus</title>
<updated>2015-01-26T11:16:27Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2015-01-26T11:16:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=06a5687f82bd7f1fbf56363351c47e8c337302fc'/>
<id>urn:sha1:06a5687f82bd7f1fbf56363351c47e8c337302fc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>spi: dw: amend warning message</title>
<updated>2015-01-07T17:58:54Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2015-01-07T14:56:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3dbb3b98e854bceed38fbde930fb8cf8701def73'/>
<id>urn:sha1:3dbb3b98e854bceed38fbde930fb8cf8701def73</id>
<content type='text'>
In case of warning message in -&gt;probe() we have to use HW device name instead
of master because last is not defined yet.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: sh-msiof: fix MDR1_FLD_MASK value</title>
<updated>2015-01-06T11:04:33Z</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2015-01-06T10:01:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6d40530e4789b3e2f14d61ca57ab02bd5395d5c9'/>
<id>urn:sha1:6d40530e4789b3e2f14d61ca57ab02bd5395d5c9</id>
<content type='text'>
Since the FLD bit field is bit[3:2], the MDR1_FLD_MASK value should
be 0x0000000c.

Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: dw-mid: fix FIFO size</title>
<updated>2015-01-05T20:21:40Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2015-01-02T15:48:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67bf9cda4b498b8cea4a40be67a470afe57d2e88'/>
<id>urn:sha1:67bf9cda4b498b8cea4a40be67a470afe57d2e88</id>
<content type='text'>
The FIFO size is 40 accordingly to the specifications, but this means 0x40,
i.e. 64 bytes. This patch fixes the typo and enables FIFO size autodetection
for Intel MID devices.

Fixes: 7063c0d942a1 (spi/dw_spi: add DMA support)
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>spi: dw: Fix detecting FIFO depth</title>
<updated>2015-01-05T19:04:39Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-01-05T01:32:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d297933cc7fcfbaaf2d37570baac73287bf0357d'/>
<id>urn:sha1:d297933cc7fcfbaaf2d37570baac73287bf0357d</id>
<content type='text'>
Current code tries to find the highest valid fifo depth by checking the value
it wrote to DW_SPI_TXFLTR. There are a few problems in current code:
1) There is an off-by-one in dws-&gt;fifo_len setting because it assumes the latest
   register write fails so the latest valid value should be fifo - 1.
2) We know the depth could be from 2 to 256 from HW spec, so it is not necessary
   to test fifo == 257. In the case fifo is 257, it means the latest valid
   setting is fifo = 256. So after the for loop iteration, we should check
   fifo == 2 case instead of fifo == 257 if detecting the FIFO depth fails.
This patch fixes above issues.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Reviewed-and-tested-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>spi/pxa2xx: Clear cur_chip pointer before starting next message</title>
<updated>2014-12-29T16:13:35Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2014-12-29T08:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c957e8f084e0d21febcd6b8a0ea9631eccc92f36'/>
<id>urn:sha1:c957e8f084e0d21febcd6b8a0ea9631eccc92f36</id>
<content type='text'>
Once the current message is finished, the driver notifies SPI core about
this by calling spi_finalize_current_message(). This function queues next
message to be transferred. If there are more messages in the queue, it is
possible that the driver is asked to transfer the next message at this
point.

When spi_finalize_current_message() returns the driver clears the
drv_data-&gt;cur_chip pointer to NULL. The problem is that if the driver
already started the next message clearing drv_data-&gt;cur_chip will cause
NULL pointer dereference which crashes the kernel like:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
 IP: [&lt;ffffffffa0022bc8&gt;] cs_deassert+0x18/0x70 [spi_pxa2xx_platform]
 PGD 78bb8067 PUD 37712067 PMD 0
 Oops: 0000 [#1] SMP
 Modules linked in:
 CPU: 1 PID: 11 Comm: ksoftirqd/1 Tainted: G           O   3.18.0-rc4-mjo #5
 Hardware name: Intel Corp. VALLEYVIEW B3 PLATFORM/NOTEBOOK, BIOS MNW2CRB1.X64.0071.R30.1408131301 08/13/2014
 task: ffff880077f9f290 ti: ffff88007a820000 task.ti: ffff88007a820000
 RIP: 0010:[&lt;ffffffffa0022bc8&gt;]  [&lt;ffffffffa0022bc8&gt;] cs_deassert+0x18/0x70 [spi_pxa2xx_platform]
 RSP: 0018:ffff88007a823d08  EFLAGS: 00010202
 RAX: 0000000000000008 RBX: ffff8800379a4430 RCX: 0000000000000026
 RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffff8800379a4430
 RBP: ffff88007a823d18 R08: 00000000ffffffff R09: 000000007a9bc65a
 R10: 000000000000028f R11: 0000000000000005 R12: ffff880070123e98
 R13: ffff880070123de8 R14: 0000000000000100 R15: ffffc90004888000
 FS:  0000000000000000(0000) GS:ffff880079a80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000048 CR3: 000000007029b000 CR4: 00000000001007e0
 Stack:
  ffff88007a823d58 ffff8800379a4430 ffff88007a823d48 ffffffffa0022c89
  0000000000000000 ffff8800379a4430 0000000000000000 0000000000000006
  ffff88007a823da8 ffffffffa0023be0 ffff88007a823dd8 ffffffff81076204
 Call Trace:
  [&lt;ffffffffa0022c89&gt;] giveback+0x69/0xa0 [spi_pxa2xx_platform]
  [&lt;ffffffffa0023be0&gt;] pump_transfers+0x710/0x740 [spi_pxa2xx_platform]
  [&lt;ffffffff81076204&gt;] ? pick_next_task_fair+0x744/0x830
  [&lt;ffffffff81049679&gt;] tasklet_action+0xa9/0xe0
  [&lt;ffffffff81049a0e&gt;] __do_softirq+0xee/0x280
  [&lt;ffffffff81049bc0&gt;] run_ksoftirqd+0x20/0x40
  [&lt;ffffffff810646df&gt;] smpboot_thread_fn+0xff/0x1b0
  [&lt;ffffffff810645e0&gt;] ? SyS_setgroups+0x150/0x150
  [&lt;ffffffff81060f9d&gt;] kthread+0xcd/0xf0
  [&lt;ffffffff81060ed0&gt;] ? kthread_create_on_node+0x180/0x180
  [&lt;ffffffff8187a82c&gt;] ret_from_fork+0x7c/0xb0

Fix this by clearing drv_data-&gt;cur_chip before we call spi_finalize_current_message().

Reported-by: Martin Oldfield &lt;m@mjoldfield.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&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/img-spfi' and 'spi/fix/msiof' into spi-linus</title>
<updated>2014-12-24T12:57:54Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-12-24T12:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee4629f5b2f3dda7c83fa816068a67073abb55d9'/>
<id>urn:sha1:ee4629f5b2f3dda7c83fa816068a67073abb55d9</id>
<content type='text'>
</content>
</entry>
</feed>
