Skip to content

Commit ffeb13a

Browse files
Felipe BalbiVinod Koul
authored andcommitted
dmaengine: cppi41: add missing bitfields
Add missing directions, residue_granularity, srd_addr_widths and dst_addr_widths bitfields. Without those we will see a kernel WARN() when loading musb on am335x devices. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent fbef403 commit ffeb13a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/dma/cppi41.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,11 @@ static const struct cppi_glue_infos *get_glue_info(struct device *dev)
903903
return of_id->data;
904904
}
905905

906+
#define CPPI41_DMA_BUSWIDTHS (BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
907+
BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
908+
BIT(DMA_SLAVE_BUSWIDTH_3_BYTES) | \
909+
BIT(DMA_SLAVE_BUSWIDTH_4_BYTES))
910+
906911
static int cppi41_dma_probe(struct platform_device *pdev)
907912
{
908913
struct cppi41_dd *cdd;
@@ -926,6 +931,10 @@ static int cppi41_dma_probe(struct platform_device *pdev)
926931
cdd->ddev.device_issue_pending = cppi41_dma_issue_pending;
927932
cdd->ddev.device_prep_slave_sg = cppi41_dma_prep_slave_sg;
928933
cdd->ddev.device_terminate_all = cppi41_stop_chan;
934+
cdd->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
935+
cdd->ddev.src_addr_widths = CPPI41_DMA_BUSWIDTHS;
936+
cdd->ddev.dst_addr_widths = CPPI41_DMA_BUSWIDTHS;
937+
cdd->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
929938
cdd->ddev.dev = dev;
930939
INIT_LIST_HEAD(&cdd->ddev.channels);
931940
cpp41_dma_info.dma_cap = cdd->ddev.cap_mask;

0 commit comments

Comments
 (0)