Lines Matching refs:dw

89 	if (chan->chip->dw->hdata->reg_map_8_channels) {  in axi_chan_config_write()
183 if (chan->chip->dw->hdata->reg_map_8_channels) in axi_chan_disable()
195 if (chan->chip->dw->hdata->reg_map_8_channels) in axi_chan_enable()
218 for (i = 0; i < chip->dw->hdata->nr_channels; i++) { in axi_dma_hw_init()
219 axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL); in axi_dma_hw_init()
220 axi_chan_disable(&chip->dw->chan[i]); in axi_dma_hw_init()
230 u32 max_width = chan->chip->dw->hdata->m_data_width; in axi_chan_get_xfer_width()
375 u32 priority = chan->chip->dw->hdata->priority[chan->id]; in axi_chan_block_xfer_start()
590 if (desc->chan->chip->dw->hdata->nr_masters > 1) in set_desc_dest_master()
602 unsigned int data_width = BIT(chan->chip->dw->hdata->m_data_width); in dw_axi_dma_set_hw_desc()
611 axi_block_ts = chan->chip->dw->hdata->block_size[chan->id]; in dw_axi_dma_set_hw_desc()
654 if (chan->chip->dw->hdata->restrict_axi_burst_len) { in dw_axi_dma_set_hw_desc()
655 burst_len = chan->chip->dw->hdata->axi_rw_burst_len; in dw_axi_dma_set_hw_desc()
690 axi_block_ts = chan->chip->dw->hdata->block_size[chan->id]; in calculate_block_len()
694 data_width = BIT(chan->chip->dw->hdata->m_data_width); in calculate_block_len()
884 max_block_ts = chan->chip->dw->hdata->block_size[chan->id]; in dma_chan_prep_dma_memcpy()
925 if (chan->chip->dw->hdata->restrict_axi_burst_len) { in dma_chan_prep_dma_memcpy()
926 u32 burst_len = chan->chip->dw->hdata->axi_rw_burst_len; in dma_chan_prep_dma_memcpy()
1087 struct dw_axi_dma *dw = chip->dw; in dw_axi_dma_interrupt() local
1096 for (i = 0; i < dw->hdata->nr_channels; i++) { in dw_axi_dma_interrupt()
1097 chan = &dw->chan[i]; in dw_axi_dma_interrupt()
1161 if (chan->chip->dw->hdata->reg_map_8_channels) { in dma_chan_pause()
1194 if (chan->chip->dw->hdata->reg_map_8_channels) { in axi_chan_resume()
1268 struct dw_axi_dma *dw = ofdma->of_dma_data; in dw_axi_dma_of_xlate() local
1272 dchan = dma_get_any_slave_channel(&dw->dma); in dw_axi_dma_of_xlate()
1293 chip->dw->hdata->nr_channels = tmp; in parse_device_properties()
1295 chip->dw->hdata->reg_map_8_channels = true; in parse_device_properties()
1303 chip->dw->hdata->nr_masters = tmp; in parse_device_properties()
1311 chip->dw->hdata->m_data_width = tmp; in parse_device_properties()
1314 chip->dw->hdata->nr_channels); in parse_device_properties()
1317 for (tmp = 0; tmp < chip->dw->hdata->nr_channels; tmp++) { in parse_device_properties()
1321 chip->dw->hdata->block_size[tmp] = carr[tmp]; in parse_device_properties()
1325 chip->dw->hdata->nr_channels); in parse_device_properties()
1329 for (tmp = 0; tmp < chip->dw->hdata->nr_channels; tmp++) { in parse_device_properties()
1330 if (carr[tmp] >= chip->dw->hdata->nr_channels) in parse_device_properties()
1333 chip->dw->hdata->priority[tmp] = carr[tmp]; in parse_device_properties()
1344 chip->dw->hdata->restrict_axi_burst_len = true; in parse_device_properties()
1345 chip->dw->hdata->axi_rw_burst_len = tmp; in parse_device_properties()
1356 struct dw_axi_dma *dw; in dw_probe() local
1365 dw = devm_kzalloc(&pdev->dev, sizeof(*dw), GFP_KERNEL); in dw_probe()
1366 if (!dw) in dw_probe()
1373 chip->dw = dw; in dw_probe()
1375 chip->dw->hdata = hdata; in dw_probe()
1404 dw->chan = devm_kcalloc(chip->dev, hdata->nr_channels, in dw_probe()
1405 sizeof(*dw->chan), GFP_KERNEL); in dw_probe()
1406 if (!dw->chan) in dw_probe()
1414 INIT_LIST_HEAD(&dw->dma.channels); in dw_probe()
1416 struct axi_dma_chan *chan = &dw->chan[i]; in dw_probe()
1424 vchan_init(&chan->vc, &dw->dma); in dw_probe()
1428 dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask); in dw_probe()
1429 dma_cap_set(DMA_SLAVE, dw->dma.cap_mask); in dw_probe()
1430 dma_cap_set(DMA_CYCLIC, dw->dma.cap_mask); in dw_probe()
1433 dw->dma.chancnt = hdata->nr_channels; in dw_probe()
1434 dw->dma.max_burst = hdata->axi_rw_burst_len; in dw_probe()
1435 dw->dma.src_addr_widths = AXI_DMA_BUSWIDTHS; in dw_probe()
1436 dw->dma.dst_addr_widths = AXI_DMA_BUSWIDTHS; in dw_probe()
1437 dw->dma.directions = BIT(DMA_MEM_TO_MEM); in dw_probe()
1438 dw->dma.directions |= BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM); in dw_probe()
1439 dw->dma.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; in dw_probe()
1441 dw->dma.dev = chip->dev; in dw_probe()
1442 dw->dma.device_tx_status = dma_chan_tx_status; in dw_probe()
1443 dw->dma.device_issue_pending = dma_chan_issue_pending; in dw_probe()
1444 dw->dma.device_terminate_all = dma_chan_terminate_all; in dw_probe()
1445 dw->dma.device_pause = dma_chan_pause; in dw_probe()
1446 dw->dma.device_resume = dma_chan_resume; in dw_probe()
1448 dw->dma.device_alloc_chan_resources = dma_chan_alloc_chan_resources; in dw_probe()
1449 dw->dma.device_free_chan_resources = dma_chan_free_chan_resources; in dw_probe()
1451 dw->dma.device_prep_dma_memcpy = dma_chan_prep_dma_memcpy; in dw_probe()
1452 dw->dma.device_synchronize = dw_axi_dma_synchronize; in dw_probe()
1453 dw->dma.device_config = dw_axi_dma_chan_slave_config; in dw_probe()
1454 dw->dma.device_prep_slave_sg = dw_axi_dma_chan_prep_slave_sg; in dw_probe()
1455 dw->dma.device_prep_dma_cyclic = dw_axi_dma_chan_prep_cyclic; in dw_probe()
1462 dw->dma.dev->dma_parms = &dw->dma_parms; in dw_probe()
1482 ret = dmaenginem_async_device_register(&dw->dma); in dw_probe()
1488 dw_axi_dma_of_xlate, dw); in dw_probe()
1494 dw->hdata->nr_channels); in dw_probe()
1507 struct dw_axi_dma *dw = chip->dw; in dw_remove() local
1515 for (i = 0; i < dw->hdata->nr_channels; i++) { in dw_remove()
1516 axi_chan_disable(&chip->dw->chan[i]); in dw_remove()
1517 axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL); in dw_remove()
1528 list_for_each_entry_safe(chan, _chan, &dw->dma.channels, in dw_remove()