<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/dma/at_xdmac.c, branch linux-4.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-10-22T21:49:17Z</updated>
<entry>
<title>dmaengine: at_xdmac: fix bug in prep_dma_cyclic</title>
<updated>2015-10-22T21:49:17Z</updated>
<author>
<name>Ludovic Desroches</name>
</author>
<published>2015-07-22T14:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aea324b7fe9b6dbc98fc8e52da58e9a244a7fa7f'/>
<id>urn:sha1:aea324b7fe9b6dbc98fc8e52da58e9a244a7fa7f</id>
<content type='text'>
commit e900c30dc1bb0cbc07708e9be1188f531632b2ef upstream.

In cyclic mode, the round chaining has been broken by the introduction
of at_xdmac_queue_desc(): AT_XDMAC_MBR_UBC_NDE is set for all descriptors
excepted for the last one. at_xdmac_queue_desc() has to be called one
more time to chain the last and the first descriptors.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Fixes: 0d0ee751f7f7 ("dmaengine: xdmac: Rework the chaining logic")
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: clean used descriptor</title>
<updated>2015-10-22T21:49:17Z</updated>
<author>
<name>Ludovic Desroches</name>
</author>
<published>2015-09-15T13:39:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b111b3a634eaff62f655977763d33f1d54cfa846'/>
<id>urn:sha1:b111b3a634eaff62f655977763d33f1d54cfa846</id>
<content type='text'>
commit 0be2136b67067617b36c70e525d7534108361e36 upstream.

When putting back a descriptor to the free descs list, some fields are
not set to 0, it can cause bugs if someone uses it without having this
in mind.
Descriptor are not put back one by one so it is easier to clean
descriptors when we request them.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: change block increment addressing mode</title>
<updated>2015-10-22T21:49:17Z</updated>
<author>
<name>Maxime Ripard</name>
</author>
<published>2015-09-15T13:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f788de2664c2640307b93d658e2bf54f79f1192d'/>
<id>urn:sha1:f788de2664c2640307b93d658e2bf54f79f1192d</id>
<content type='text'>
commit a1cf09031e641d3cceaca4a4dd20ef6a785bc9b3 upstream.

The addressing mode we were using was not only incrementing the address at
each microblock, but also at each data boundary, which was severely slowing
the transfer, without any benefit since we were not using the data stride.

Switch to the micro block increment only in order to get back to an
acceptable performance level.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Fixes: 6007ccb57744 ("dmaengine: xdmac: Add interleaved transfer support")
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: fix transfer data width in at_xdmac_prep_slave_sg()</title>
<updated>2015-07-31T15:03:42Z</updated>
<author>
<name>Cyrille Pitchen</name>
</author>
<published>2015-06-30T12:36:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c8a38b1268aebc1a903b21b11575077e02d2cf7'/>
<id>urn:sha1:1c8a38b1268aebc1a903b21b11575077e02d2cf7</id>
<content type='text'>
This patch adds the missing update of the transfer data width in
at_xdmac_prep_slave_sg().

Indeed, for each item in the scatter-gather list, we check whether the
transfer length is aligned with the data width provided by
dmaengine_slave_config(). If so, we directly use this data width for the
current part of the transfer we are preparing. Otherwise, the data width
is reduced to 8 bits (1 byte). Of course, the actual number of register
accesses must also be updated to match the new data width.

So one chunk was missing in the original patch (see Fixes tag below): the
number of register accesses was correctly set to (len &gt;&gt; fixed_dwidth) in
mbr_ubc but the real data width was not updated in mbr_cfg. Since mbr_cfg
may change for each part of the scatter-gather transfer this also explains
why the original patch used the Descriptor View 2 instead of the
Descriptor View 1.

Let's take the example of a DMA transfer to write 8bit data into an Atmel
USART with FIFOs. When FIFOs are enabled in the USART, its Transmit
Holding Register (THR) works in multidata mode, that is to say that up to
4 8bit data can be written into the THR in a single 32bit access and it is
still possible to write only one data with a 8bit access. To take
advantage of this new feature, the DMA driver was modified to allow
multiple dwidths when doing slave transfers.
For instance, when the total length is 22 bytes, the USART driver splits
the transfer into 2 parts:

First part: 20 bytes transferred through 5 32bit writes into THR
Second part: 2 bytes transferred though 2 8bit writes into THR

For the second part, the data width was first set to 4_BYTES by the USART
driver thanks to dmaengine_slave_config() then at_xdmac_prep_slave_sg()
reduces this data width to 1_BYTE because the 2 byte length is not aligned
with the original 4_BYTES data width. Since the data width is modified,
the actual number of writes into THR must be set accordingly.

Signed-off-by: Cyrille Pitchen &lt;cyrille.pitchen@atmel.com&gt;
Fixes: 6d3a7d9e3ada ("dmaengine: at_xdmac: allow muliple dwidths when doing slave transfers")
Cc: stable@vger.kernel.org #4.0 and later
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Acked-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: fix bug about channel configuration</title>
<updated>2015-07-31T15:03:41Z</updated>
<author>
<name>Ludovic Desroches</name>
</author>
<published>2015-06-17T14:22:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20cadcb4df3eebd82410eab4aa91d5b083e16cd1'/>
<id>urn:sha1:20cadcb4df3eebd82410eab4aa91d5b083e16cd1</id>
<content type='text'>
When using descriptor view 2 or higher, we don't write the configuration
into AT_XDMAC_CC register because this configuration will be fetch from
the descriptor. Unfortunately, the PROT bit is not updated with this
method, we have to do it manually before enabling the channel.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma</title>
<updated>2015-06-29T16:44:45Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-06-29T16:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bc5e157ed2b4f5b206155fc772d860158acd201'/>
<id>urn:sha1:1bc5e157ed2b4f5b206155fc772d860158acd201</id>
<content type='text'>
Pull dmaengine updates from Vinod Koul:
 "This time we have support for few new devices, few new features and
  odd fixes spread thru the subsystem.

  New devices added:
   - support for CSRatlas7 dma controller
   - Allwinner H3(sun8i) controller
   - TI DMA crossbar driver on DRA7x
   - new pxa driver

  New features added:
   - memset support is bought back now that we have a user in xdmac controller
   - interleaved transfers support different source and destination strides
   - supporting DMA routers and configuration thru DT
   - support for reusing descriptors
   - xdmac memset and interleaved transfer support
   - hdmac support for interleaved transfers
   - omap-dma support for memcpy

  Others:
   - Constify platform_device_id
   - mv_xor fixes and improvements"

* tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (46 commits)
  dmaengine: xgene: fix file permission
  dmaengine: fsl-edma: clear pending interrupts on initialization
  dmaengine: xdmac: Add memset support
  Documentation: dmaengine: document DMA_CTRL_ACK
  dmaengine: virt-dma: don't always free descriptor upon completion
  dmaengine: Revert "drivers/dma: remove unused support for MEMSET operations"
  dmaengine: hdmac: Implement interleaved transfers
  dmaengine: Move icg helpers to global header
  dmaengine: mv_xor: improve descriptors list handling and reduce locking
  dmaengine: mv_xor: Enlarge descriptor pool size
  dmaengine: mv_xor: add support for a38x command in descriptor mode
  dmaengine: mv_xor: Rename function for consistent naming
  dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup
  dmaengine: pl330: fix wording in mcbufsz message
  dmaengine: sirf: add CSRatlas7 SoC support
  dmaengine: xgene-dma: Fix "incorrect type in assignement" warnings
  dmaengine: fix kernel-doc documentation
  dmaengine: pxa_dma: add support for legacy transition
  dmaengine: pxa_dma: add debug information
  dmaengine: pxa: add pxa dmaengine driver
  ...
</content>
</entry>
<entry>
<title>dmaengine: xdmac: Add memset support</title>
<updated>2015-06-25T03:52:32Z</updated>
<author>
<name>Maxime Ripard</name>
</author>
<published>2015-05-18T11:46:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b206d9a23ac71cb905f5fb6e0cd813406f89b678'/>
<id>urn:sha1:b206d9a23ac71cb905f5fb6e0cd813406f89b678</id>
<content type='text'>
The XDMAC supports memset transfers, both over contiguous areas, and over
discontiguous areas through a LLI.

The current memset operation only supports contiguous memset for now, add some
support for it. Scatter-gathered memset will come eventually.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: Move icg helpers to global header</title>
<updated>2015-06-12T12:43:13Z</updated>
<author>
<name>Maxime Ripard</name>
</author>
<published>2015-05-27T14:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87d001ef5366c4a24f7a1340246c4ce68190581c'/>
<id>urn:sha1:87d001ef5366c4a24f7a1340246c4ce68190581c</id>
<content type='text'>
Now that we can have ICGs set for both the source and destination (using
the icg field of struct data_chunk) or for only the source or the
destination (using the dst_icg or src_icg respectively), and that these
fields can be ignored depending on other parameters (src_inc, src_sgl,
etc.), the logic to get the actual ICG value can be quite tricky.

The XDMAC driver was already implementing it, but since we will need it in
other drivers, we can move it to the main header file.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Acked-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: rework slave configuration part</title>
<updated>2015-06-08T10:57:09Z</updated>
<author>
<name>Ludovic Desroches</name>
</author>
<published>2015-06-08T08:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=765c37d876698268eea8b820081ac8fc9d0fc8bc'/>
<id>urn:sha1:765c37d876698268eea8b820081ac8fc9d0fc8bc</id>
<content type='text'>
Rework slave configuration part in order to more report wrong errors
about the configuration.
Only maxburst and addr width values are checked when doing the slave
configuration. The validity of the channel configuration is done at
prepare time.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Cc: stable@vger.kernel.org # 4.0 and later
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: lock fixes</title>
<updated>2015-06-08T10:57:09Z</updated>
<author>
<name>Ludovic Desroches</name>
</author>
<published>2015-06-08T08:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c374fc7ce944024936a6d9804daec85207d9384'/>
<id>urn:sha1:4c374fc7ce944024936a6d9804daec85207d9384</id>
<content type='text'>
Using _bh variant for spin locks causes this kind of warning:
Starting logging: ------------[ cut here ]------------
WARNING: CPU: 0 PID: 3 at /ssd_drive/linux/kernel/softirq.c:151
__local_bh_enable_ip+0xe8/0xf4()
Modules linked in:
CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.1.0-rc2+ #94
Hardware name: Atmel SAMA5
[&lt;c0013c04&gt;] (unwind_backtrace) from [&lt;c00118a4&gt;] (show_stack+0x10/0x14)
[&lt;c00118a4&gt;] (show_stack) from [&lt;c001bbcc&gt;]
(warn_slowpath_common+0x80/0xac)
[&lt;c001bbcc&gt;] (warn_slowpath_common) from [&lt;c001bc14&gt;]
(warn_slowpath_null+0x1c/0x24)
[&lt;c001bc14&gt;] (warn_slowpath_null) from [&lt;c001e28c&gt;]
(__local_bh_enable_ip+0xe8/0xf4)
[&lt;c001e28c&gt;] (__local_bh_enable_ip) from [&lt;c01fdbd0&gt;]
(at_xdmac_device_terminate_all+0xf4/0x100)
[&lt;c01fdbd0&gt;] (at_xdmac_device_terminate_all) from [&lt;c02221a4&gt;]
(atmel_complete_tx_dma+0x34/0xf4)
[&lt;c02221a4&gt;] (atmel_complete_tx_dma) from [&lt;c01fe4ac&gt;]
(at_xdmac_tasklet+0x14c/0x1ac)
[&lt;c01fe4ac&gt;] (at_xdmac_tasklet) from [&lt;c001de58&gt;]
(tasklet_action+0x68/0xb4)
[&lt;c001de58&gt;] (tasklet_action) from [&lt;c001dfdc&gt;]
(__do_softirq+0xfc/0x238)
[&lt;c001dfdc&gt;] (__do_softirq) from [&lt;c001e140&gt;] (run_ksoftirqd+0x28/0x34)
[&lt;c001e140&gt;] (run_ksoftirqd) from [&lt;c0033a3c&gt;]
(smpboot_thread_fn+0x138/0x18c)
[&lt;c0033a3c&gt;] (smpboot_thread_fn) from [&lt;c0030e7c&gt;] (kthread+0xdc/0xf0)
[&lt;c0030e7c&gt;] (kthread) from [&lt;c000f480&gt;] (ret_from_fork+0x14/0x34)
---[ end trace b57b14a99c1d8812 ]---

It comes from the fact that devices can called some code from the DMA
controller with irq disabled. _bh variant is not intended to be used in
this case since it can enable irqs. Switch to irqsave/irqrestore variant to
avoid this situation.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Cc: stable@vger.kernel.org # 4.0 and later
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
</feed>
