linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Device Tree binding for the 'mv_xor' XOR engine DMA driver
@ 2012-11-15 17:20 Thomas Petazzoni
  2012-11-15 17:20 ` [PATCH 01/29] mv_xor: use dev_(err|info|notice) instead of dev_printk Thomas Petazzoni
                   ` (29 more replies)
  0 siblings, 30 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2012-11-15 17:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

This patch set adds a Device Tree binding for the Marvell XOR engine
driver, which allows to support these XOR engines in the Armada 370
and Armada XP SoCs.

As one can immediatly see, this Device Tree binding patch set is not
as simple as most Device Tree bindings additions. This is due to the
fact that the mv_xor driver has a fairly odd organization. Instead of
registering a single platform_driver having platform_device structures
being instantiated together with platform_data structures describing
their specificities, this driver was organized around *two*
platform_driver:

 * One platform_driver named 'mv_xor_shared', for which one device was
   registered for each XOR engine (usually two in each Marvell SoC)

 * One platform_driver named 'mv_xor', for which one device was
   registered for each XOR channel (usually two per XOR engine). When
   those devices were registered, they contained a reference to the
   corresponding 'mv_xor_shared' device.

This unusual organization is:

 * useless, because the channels description can just as well be passed
   through platform_data of the 'mv_xor_shared' driver.

 * annoying, as it prevents the addition of a simple Device Tree
   binding for the driver.

Therefore, before adding the Device Tree binding, we cleanup and
reorganize the driver so that it registers a single platform_driver.

The patch set is organized as follows:

 * Patch 1 and 2 are basic cleanups, not really important.

 * Patch 3 to 8 are needed to remove the 'mv_xor'
   platform_driver. Instead of doing that as one big patch, we do it
   progressively, in small chunks, where each chunk builds and runs
   properly on the hardware.

   - Patch 3 moves the channel registration/cleanup logic into
     separate utility functions, so that they can be used for both the
     old-style probing (through the 'mv_xor' sub-driver) and the
     new-style probing (through platform_data passed to the main
     'mv_xor_shared' driver).

   - Patch 4 adds the possibility of registering channels through
     platform_data passed to the 'mv_xor_shared' main driver.

   - Patch 5 and Patch 6 respectively convert the XOR0 and XOR1 engine
     registrations to the new style probing.

   - Patch 7 removes some code that became useless in the process.

   - Patch 8 removes the sub-driver 'mv_xor'.

 * Patch 8 to 26 are further cleanups to the driver, mainly fixing the
   following problems:

   - All reference to the notion of 'shared' driver are removed.

   - The mv_xor driver registers one DMA engine and one DMA channel
     per XOR channel, because the different XOR channels in a given
     XOR engine have different capabilities. However, the mv_xor
     driver was internally keeping two structures having a 1:1
     mapping: mv_xor_device and mv_xor_chan, which was useless. We
     progressively convert the driver so that mv_xor_device represents
     one XOR engine, and mv_xor_chan represents one XOR channel.

   - Removing useless properties from the platform_data in order to
     simplify the Device Tree binding.

 * Patch 27 is a bug fix for the removal path, but it isn't very
   important as the driver cannot be compiled as a module.

 * Patch 28 adds the Device Tree binding itself and its documentation.

 * Patch 29 adds the Device Tree data to register the XOR engines on
   Armada 370/XP SoCs. Not Device Tree data is needed at the board
   level since those devices are purely internal to the SoC.

The resulting patch set is fully bisectable, and has been tested with
the built-in XOR engine self-test of the driver on both a Kirkwood
platform and a Armada XP platform.

The code is also available in the 'mvebu-xor' branch in the following
Git repository:

  git at github.com:MISL-EBU-System-SW/mainline-public.git

Note that PATCH 29 requires the clk patches from Gr?gory Clement for
the Armada 370/XP SoCs, which have already been Ack'ed, but not merged
yet.

Best regards,

Thomas

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

end of thread, other threads:[~2012-11-19 11:40 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 17:20 [PATCH] Device Tree binding for the 'mv_xor' XOR engine DMA driver Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 01/29] mv_xor: use dev_(err|info|notice) instead of dev_printk Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 02/29] mv_xor: do not use pool_size from platform_data within the driver Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 03/29] mv_xor: split initialization/cleanup of XOR channels Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 04/29] mv_xor: allow channels to be registered directly from the main device Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 05/29] arm: plat-orion: convert the registration of the xor0 engine to the single driver Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 06/29] arm: plat-orion: convert the registration of the xor1 " Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 07/29] arm: plat-orion: remove unused orion_xor_init_channels() Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 08/29] mv_xor: remove sub-driver 'mv_xor' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 09/29] mv_xor: remove 'shared' from mv_xor_platform_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 10/29] mv_xor: rename mv_xor_platform_data to mv_xor_channel_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 11/29] mv_xor: rename mv_xor_shared_platform_data to mv_xor_platform_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 12/29] mv_xor: change the driver name to 'mv_xor' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 13/29] mv_xor: rename many symbols to remove the 'shared' word Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 14/29] mv_xor: remove unused id field in mv_xor_device structure Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 15/29] mv_xor: remove unused to_mv_xor_device() macro Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 16/29] mv_xor: simplify dma_sync_single_for_cpu() calls Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 17/29] mv_xor: introduce a mv_chan_to_devp() helper Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 18/29] mv_xor: get rid of the pdev pointer in mv_xor_device Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 19/29] mv_xor: in mv_xor_chan, rename 'common' to 'dmachan' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 20/29] mv_xor: in mv_xor_device, rename 'common' to 'dmadev' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 21/29] mv_xor: use mv_xor_chan pointers as arguments to self-test functions Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 22/29] mv_xor: merge mv_xor_device and mv_xor_chan Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 23/29] mv_xor: rename mv_xor_private to mv_xor_device Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 24/29] mv_xor: remove useless backpointer from mv_xor_chan " Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 25/29] mv_xor: remove hw_id field from platform_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 26/29] mv_xor: remove the pool_size " Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 27/29] mv_xor: add missing free_irq() call Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 28/29] mv_xor: add Device Tree binding Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 29/29] arm: mvebu: add XOR engines to Armada 370/XP .dtsi Thomas Petazzoni
2012-11-18 10:36 ` [PATCH] Device Tree binding for the 'mv_xor' XOR engine DMA driver Andrew Lunn
2012-11-18 10:50   ` Thomas Petazzoni
2012-11-18 10:57     ` Andrew Lunn
2012-11-18 12:16   ` Lior Amsalem
2012-11-19  6:40     ` Andrew Lunn
2012-11-19 11:40       ` Lior Amsalem

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).