dma: xilinx: vdma: Use devm_* managers allocators

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Used managed I/O mapping function

Replace the of_iomap() call with a combination of
platform_get_resource() and devm_request_and_ioremap().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Remove unused struct xilinx_vdma_device irq field

The field is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Reorder headers alphabetically

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Replace custom my_log() function with fls()

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Make boolean DT properties real bools

Turn the xlnx,include-sg, xlnx,genlock-mode and xlnx,include-dre DT
properties into bool properties and use of_property_read_bool() to parse
them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Use of_property_read_u32() to read u32 DT properties

Replace the of_get_property() calls with of_property_read_u32() DT
properties that store a single unsigned integer.

Return an error when the xlnx,device-id or xlnx,num-fstores property
isn't set.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
dma: xilinx: vdma: Device is always compatible with xlnx,axi-vdma

The xilinx-axivdma driver only supports VDMA devices. There is no need
to test for compatibility.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Deconstruct feature fields

Store features in dedicated fields or process them directly instead of
storing them in a bitfield only to read them back right afterwards.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Remove unnecessary braces

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
dma: xilinx: vdma: Turn channel flush_fsync field into a bool

The field stores a boolean, make it bool.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Turn the channel has_dre field into a local variable

The field value is assigned and used locally only, replace it with a
local variable.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Don't increment the DMA engine channel count

The counter is updated by dma_async_device_register(), don't increment
it manually.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Reorganize probe functions

Group initialization statements by type.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Remove desc_dump function

The function is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Rename vdma_init() to vdma_reset()

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Rename all functions to use the xilinx_vdma_ prefix

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Remove unneeded error checking

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
dma: xilinx: vdma: Split xilinx_vdma_device_control() function

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>
dma: xilinx: vdma: Remove the xilinx_vdma_config direction field

The direction is fixed for a given channel, there's not need to pass it
through the configuration structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Srikanth Thokala <srikanth.thokala@xilinx.com>