vdma: xilinx: Current descriptor should be updated before starting VDMA

This fixes the issue with scatter-gather mode where the current
descriptor field of BD has to be updated before starting the VDMA
engine.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Formatted the description and added proper copyright

This patch adds more detail to the description of driver and also
adds proper copyright message.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Rename flush_fsync to flush_on_fsync parameter

Renamed to flush_on_fsync to reflect its functionality.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Code cleanup in the driver

This patch does code cleanup in the driver:
- Use u32 to maintain sychronization throughout driver
- Use operators (conditional/boolean) on the previous line
  after a line-break
- And removes redundant code

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Add safe check if no child compatible string is available

This adds a check condition if child node of VDMA device has
compatible strings neither "xlnx,axi-vdma-mm2s-channel" nor
"xlnx,axi-vdma-s2mm-channel".

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Cleanup halt/reset loop functions

Changed the implementation of loops for better readability.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Remove duplicate file includes

Remove duplicate file includes

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Reuse already defined constants

Use already defined constants instead of using the direct values.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Change 'err' member of xilinx_vdma_chan type to bool

The 'err' member of xilinx_vdma_chan structure only takes boolean
values. So, this patch fix this.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Update the variable with result from of_property_read_bool

There is no need to check the result from of_property_read_bool and
then update the variable.  So, this patch removes this redundant
condition checks.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Reorganise tasklet related calls

It is more appropriate to call tasklet_init() during allocating
channel resources and also this patch adds code to kill the
initialized tasklet when freeing up resources.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Use of_dma framework in vdma test client

This patch does following things:
- Uses of_dma framework in vdma test client
- Document the device node for vdma test client
- Add the above node as an example to existing vdma
  device binding documentation

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdmatest: xilinx: Add support to read number of frame stores from device node

This patch adds support to read number of frame stores from the vdmatest
device node. And it documents this new node member to device tree bindings
documentation.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdmatest: xilinx: Code cleanup in the test client

This patch cleanup the redundant code in the vdma test
client.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdmatest: xilinx: Fix sparse errors

Fix sparse errors

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdmatest: xilinx: Fix checkpatch.pl errors/warnings

Fix checkpatch.pl errors/warnings

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdmatest: xilinx: Added 'xilinx_' prefix to structures and functions

This patch adds 'xilinx_' prefix to structures and functions

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdmatest: xilinx: Document structures as per kernel-doc

This patch documents structures as per kernel-doc.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdmatest: xilinx: Add description of the test client driver

This patch adds description of test client driver and also
changes copyright year.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
vdma: xilinx: Document node properties in VDMA device node

This patch documents all the properties that are populated in
VDMA device node.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>