devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] dmaengine driver for Marvell XOR v2 engine
@ 2016-06-16 12:28 Thomas Petazzoni
       [not found] ` <1466080116-26777-1-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2016-06-16 12:28 UTC (permalink / raw)
  To: Vinod Koul, dmaengine-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jason Cooper,
	Andrew Lunn, Sebastian Hesselbarth, Gregory Clement, Nadav Haklai,
	Lior Amsalem, Hanna Hawa, Yehuda Yitschak,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala, Thomas Petazzoni

Hello,

Here is the fourth version of the mv_xor_v2 driver, which allows to
use the XOR engines available on the Marvell Armada 7K/8K ARM64 SoCs.

Changes v3 -> v4:

 - As requested by Vinod Koul, do not ask the engine to start
   processing the new descriptors in ->tx_submit(). Instead, only tell
   the engine to start processing the new descriptors in
   ->issue_pending().

Changes v2 -> v3:

 - Add a SoC-specific compatible string to the DT binding,
   "marvell,armada-7k-xor". Suggested by Rob Herring.

 - Rename the original compatible string from "marvell,mv-xor-v2" to
   "marvell,xor-v2", since the "marvell" and "mv" are
   redondant. Suggested by Rob Herring.

 - Move the DT binding documentation in a separate patch, as requested
   by Vinod Koul and Rob Herring.

 - Replace BUG_ON(src_cnt > MV_XOR_V2_CMD_LINE_NUM_MAX_D_BUF ||
   src_cnt < 1); in mv_xor_v2_prep_dma_xor() by a non-crashing test,
   i.e. we simply return NULL. Suggested by Vinod Koul.

 - Add support for an optional clock to the Device Tree binding and
   the driver. This is needed since there are two XOR units in the CP
   part of the Armada 7K/8K that use a gatable clock.

 - Fix the mv_xor_v2_prep_sw_desc() function to not crash when the
   list of available descriptors is empty.

 - Add MV_XOR_V2_ as the prefix of all register offset/bits
   definitions, as requested by Vinod Koul.

 - Clearly indicate what MV_XOR_V2_DESC_NUM is, after a question from
   Vinod Koul.

 - Switch from three spinlocks to only one spinlock, as suggested by
   Vinod Koul.

 - Remove the CONFIG_ARCH_DMA_ADDR_T_64BIT conditionals, since the
   driver depends on ARM64, and CONFIG_ARCH_DMA_ADDR_T_64BIT is always
   enabled on ARM64. Follows a discussion with Vinod Koul.

 - Remove useless empty mv_xor_v2_alloc_chan_resources() and
   mv_xor_v2_free_chan_resources() functions, as noticed by Vinod
   Koul.

 - Add a check in mv_xor_v2_interrupt_handler() to make sure we really
   have something to do. Suggested by Vinod Koul.

 - Simplify:

     dest_hw_desc = ((void *)xor_dev->hw_desq_virt +
                     (xor_dev->desc_size * desq_ptr));

   into just:

     dest_hw_desc = xor_dev->hw_desq_virt + desq_ptr;

   After adding a BUILD_BUG_ON() that makes sure that the size of
   "struct mv_xor_v2_descriptor" is equal to MV_XOR_V2_EXT_DESC_SIZE.

   Follows a question from Vinod Koul.

 - Remove mv_xor_v2_tx_status() and use dma_cookie_status()
   directly. Suggested by Vinod Koul.

Changes v1 -> v2:

 - Add a "depends on ARM64" since the MSI infrastructure doesn't build
   on all architectures for the moment.

 - Remove the useless .owner assignment.

Thanks!

Thomas

Thomas Petazzoni (4):
  dt-bindings: dma: add binding for the Marvell XOR v2 engine
  dma: mv_xor_v2: new driver
  arm64: dts: marvell: adjust to the latest mv-xor-v2 DT binding
  arm64: dts: marvell: add XOR engine description for Armada 7K/8K CP

 .../devicetree/bindings/dma/mv-xor-v2.txt          |  24 +
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi      |   8 +-
 .../boot/dts/marvell/armada-cp110-master.dtsi      |  18 +
 drivers/dma/Kconfig                                |  14 +
 drivers/dma/Makefile                               |   1 +
 drivers/dma/mv_xor_v2.c                            | 879 +++++++++++++++++++++
 6 files changed, 940 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/mv-xor-v2.txt
 create mode 100644 drivers/dma/mv_xor_v2.c

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-07-12  7:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 12:28 [PATCH v4 0/4] dmaengine driver for Marvell XOR v2 engine Thomas Petazzoni
     [not found] ` <1466080116-26777-1-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-06-16 12:28   ` [PATCH v4 1/4] dt-bindings: dma: add binding for the " Thomas Petazzoni
2016-06-20 13:07     ` Rob Herring
2016-06-16 12:28   ` [PATCH v4 2/4] dma: mv_xor_v2: new driver Thomas Petazzoni
2016-06-16 12:28   ` [PATCH v4 3/4] arm64: dts: marvell: adjust to the latest mv-xor-v2 DT binding Thomas Petazzoni
     [not found]     ` <1466080116-26777-4-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-06-30 11:50       ` Gregory CLEMENT
2016-06-16 12:28   ` [PATCH v4 4/4] arm64: dts: marvell: add XOR engine description for Armada 7K/8K CP Thomas Petazzoni
     [not found]     ` <1466080116-26777-5-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-06-30 11:50       ` Gregory CLEMENT
2016-06-28 14:38   ` [PATCH v4 0/4] dmaengine driver for Marvell XOR v2 engine Vinod Koul
2016-06-28 14:37     ` Thomas Petazzoni
2016-07-07 20:42     ` Thomas Petazzoni
     [not found]       ` <20160707224248.71511ecd-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-07-12  4:42         ` Vinod Koul
2016-07-12  7:10           ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).