BACKPORT: dmaengine: core: expose max burst capability to clients
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 22 Jan 2016 11:06:50 +0000 (19:06 +0800)
committerCaesar Wang <wxt@rock-chips.com>
Thu, 2 Jun 2016 06:42:02 +0000 (14:42 +0800)
This patch add max_burst to dma_get_slave_caps for clients
to get the burst capability of slave dma controller.

Conflicts:
include/linux/dmaengine.h

Change-Id: I7ffcf775ad48247ee0bfa9e18c8ee3b4b256eab2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
(cherry picked from commit 6d5bbed30f89acd2ae0d23b3fff5b13b307525d9)

drivers/dma/dmaengine.c
include/linux/dmaengine.h

index 3ecec1445adfc9d76408fd88fb55ed5c8b79d98c..1ccf64b5b1b05a65de5a3843a51b14ed3d543799 100644 (file)
@@ -492,6 +492,7 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
        caps->src_addr_widths = device->src_addr_widths;
        caps->dst_addr_widths = device->dst_addr_widths;
        caps->directions = device->directions;
        caps->src_addr_widths = device->src_addr_widths;
        caps->dst_addr_widths = device->dst_addr_widths;
        caps->directions = device->directions;
+       caps->max_burst = device->max_burst;
        caps->residue_granularity = device->residue_granularity;
 
        /*
        caps->residue_granularity = device->residue_granularity;
 
        /*
index c47c68e535e8d1cc87d2f3d4da7319ebdced2d71..965492391b6a565126cc38fbf2dc0880a4acd39a 100644 (file)
@@ -401,6 +401,7 @@ enum dma_residue_granularity {
  *     since the enum dma_transfer_direction is not defined as bits for each
  *     type of direction, the dma controller should fill (1 << <TYPE>) and same
  *     should be checked by controller as well
  *     since the enum dma_transfer_direction is not defined as bits for each
  *     type of direction, the dma controller should fill (1 << <TYPE>) and same
  *     should be checked by controller as well
+ * @max_burst: max burst capability per-transfer
  * @cmd_pause: true, if pause and thereby resume is supported
  * @cmd_terminate: true, if terminate cmd is supported
  * @residue_granularity: granularity of the reported transfer residue
  * @cmd_pause: true, if pause and thereby resume is supported
  * @cmd_terminate: true, if terminate cmd is supported
  * @residue_granularity: granularity of the reported transfer residue
@@ -411,6 +412,7 @@ struct dma_slave_caps {
        u32 src_addr_widths;
        u32 dst_addr_widths;
        u32 directions;
        u32 src_addr_widths;
        u32 dst_addr_widths;
        u32 directions;
+       u32 max_burst;
        bool cmd_pause;
        bool cmd_terminate;
        enum dma_residue_granularity residue_granularity;
        bool cmd_pause;
        bool cmd_terminate;
        enum dma_residue_granularity residue_granularity;
@@ -627,6 +629,7 @@ enum dmaengine_alignment {
  *     the enum dma_transfer_direction is not defined as bits for
  *     each type of direction, the dma controller should fill (1 <<
  *     <TYPE>) and same should be checked by controller as well
  *     the enum dma_transfer_direction is not defined as bits for
  *     each type of direction, the dma controller should fill (1 <<
  *     <TYPE>) and same should be checked by controller as well
+ * @max_burst: max burst capability per-transfer
  * @residue_granularity: granularity of the transfer residue reported
  *     by tx_status
  * @device_alloc_chan_resources: allocate resources and return the
  * @residue_granularity: granularity of the transfer residue reported
  *     by tx_status
  * @device_alloc_chan_resources: allocate resources and return the
@@ -681,6 +684,7 @@ struct dma_device {
        u32 src_addr_widths;
        u32 dst_addr_widths;
        u32 directions;
        u32 src_addr_widths;
        u32 dst_addr_widths;
        u32 directions;
+       u32 max_burst;
        enum dma_residue_granularity residue_granularity;
 
        int (*device_alloc_chan_resources)(struct dma_chan *chan);
        enum dma_residue_granularity residue_granularity;
 
        int (*device_alloc_chan_resources)(struct dma_chan *chan);