Some hardware aside from default 0/1 may have greater minimum burst transactions length constraints. Here we introduce the DMA device and slave capability, which if required can be initialized by the DMA engine driver with the device-specific value.
Unified · Split
| @@ -592,6 +592,7 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps) · 591 unmodified lines | ||
| 592 | 592 | caps->src_addr_widths = device->src_addr_widths; |
| 593 | 593 | caps->dst_addr_widths = device->dst_addr_widths; |
| 594 | 594 | caps->directions = device->directions; |
| 595 | + caps->min_burst = device->min_burst; | |
| 595 | 596 | caps->max_burst = device->max_burst; |
| 596 | 597 | caps->residue_granularity = device->residue_granularity; |
| 597 | 598 | caps->descriptor_reuse = device->descriptor_reuse; |
| @@ -467,6 +467,7 @@ enum dma_residue_granularity { · 466 unmodified lines | ||
| 467 | 467 | * Since the enum dma_transfer_direction is not defined as bit flag for |
| 468 | 468 | * each type, the dma controller should set BIT(<TYPE>) and same |
| 469 | 469 | * should be checked by controller as well |
| 470 | + * @min_burst: min burst capability per-transfer | |
| 470 | 471 | * @max_burst: max burst capability per-transfer |
| 471 | 472 | * @cmd_pause: true, if pause is supported (i.e. for reading residue or |
| 472 | 473 | * for resume later) |
| @@ -480,6 +481,7 @@ struct dma_slave_caps { · 7 unmodified lines | ||
| 480 | 481 | u32 src_addr_widths; |
| 481 | 482 | u32 dst_addr_widths; |
| 482 | 483 | u32 directions; |
| 484 | + u32 min_burst; | |
| 483 | 485 | u32 max_burst; |
| 484 | 486 | bool cmd_pause; |
| 485 | 487 | bool cmd_resume; |
| @@ -771,6 +773,7 @@ struct dma_filter { · 285 unmodified lines | ||
| 771 | 773 | * Since the enum dma_transfer_direction is not defined as bit flag for |
| 772 | 774 | * each type, the dma controller should set BIT(<TYPE>) and same |
| 773 | 775 | * should be checked by controller as well |
| 776 | + * @min_burst: min burst capability per-transfer | |
| 774 | 777 | * @max_burst: max burst capability per-transfer |
| 775 | 778 | * @residue_granularity: granularity of the transfer residue reported |
| 776 | 779 | * by tx_status |
| @@ -841,6 +844,7 @@ struct dma_device { · 64 unmodified lines | ||
| 841 | 844 | u32 src_addr_widths; |
| 842 | 845 | u32 dst_addr_widths; |
| 843 | 846 | u32 directions; |
| 847 | + u32 min_burst; | |
| 844 | 848 | u32 max_burst; |
| 845 | 849 | bool descriptor_reuse; |
| 846 | 850 | enum dma_residue_granularity residue_granularity; |