Lines Matching refs:dw
179 for (i = 0; i < chip->dw->hdata->nr_channels; i++) { in axi_dma_hw_init()
180 axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL); in axi_dma_hw_init()
181 axi_chan_disable(&chip->dw->chan[i]); in axi_dma_hw_init()
188 u32 max_width = chan->chip->dw->hdata->m_data_width; in axi_chan_get_xfer_width()
200 struct dw_axi_dma *dw = chan->chip->dw; in axi_desc_get() local
204 desc = dma_pool_zalloc(dw->desc_pool, GFP_NOWAIT, &phys); in axi_desc_get()
222 struct dw_axi_dma *dw = chan->chip->dw; in axi_desc_put() local
228 dma_pool_free(dw->desc_pool, child, child->vd.tx.phys); in axi_desc_put()
232 dma_pool_free(dw->desc_pool, desc, desc->vd.tx.phys); in axi_desc_put()
275 u32 priority = chan->chip->dw->hdata->priority[chan->id]; in axi_chan_block_xfer_start()
416 if (desc->chan->chip->dw->hdata->nr_masters > 1) in set_desc_dest_master()
437 max_block_ts = chan->chip->dw->hdata->block_size[chan->id]; in dma_chan_prep_dma_memcpy()
469 if (chan->chip->dw->hdata->restrict_axi_burst_len) { in dma_chan_prep_dma_memcpy()
470 u32 burst_len = chan->chip->dw->hdata->axi_rw_burst_len; in dma_chan_prep_dma_memcpy()
604 struct dw_axi_dma *dw = chip->dw; in dw_axi_dma_interrupt() local
613 for (i = 0; i < dw->hdata->nr_channels; i++) { in dw_axi_dma_interrupt()
614 chan = &dw->chan[i]; in dw_axi_dma_interrupt()
767 chip->dw->hdata->nr_channels = tmp; in parse_device_properties()
775 chip->dw->hdata->nr_masters = tmp; in parse_device_properties()
783 chip->dw->hdata->m_data_width = tmp; in parse_device_properties()
786 chip->dw->hdata->nr_channels); in parse_device_properties()
789 for (tmp = 0; tmp < chip->dw->hdata->nr_channels; tmp++) { in parse_device_properties()
793 chip->dw->hdata->block_size[tmp] = carr[tmp]; in parse_device_properties()
797 chip->dw->hdata->nr_channels); in parse_device_properties()
801 for (tmp = 0; tmp < chip->dw->hdata->nr_channels; tmp++) { in parse_device_properties()
802 if (carr[tmp] >= chip->dw->hdata->nr_channels) in parse_device_properties()
805 chip->dw->hdata->priority[tmp] = carr[tmp]; in parse_device_properties()
816 chip->dw->hdata->restrict_axi_burst_len = true; in parse_device_properties()
817 chip->dw->hdata->axi_rw_burst_len = tmp - 1; in parse_device_properties()
827 struct dw_axi_dma *dw; in dw_probe() local
836 dw = devm_kzalloc(&pdev->dev, sizeof(*dw), GFP_KERNEL); in dw_probe()
837 if (!dw) in dw_probe()
844 chip->dw = dw; in dw_probe()
846 chip->dw->hdata = hdata; in dw_probe()
869 dw->chan = devm_kcalloc(chip->dev, hdata->nr_channels, in dw_probe()
870 sizeof(*dw->chan), GFP_KERNEL); in dw_probe()
871 if (!dw->chan) in dw_probe()
880 dw->desc_pool = dmam_pool_create(KBUILD_MODNAME, chip->dev, in dw_probe()
882 if (!dw->desc_pool) { in dw_probe()
887 INIT_LIST_HEAD(&dw->dma.channels); in dw_probe()
889 struct axi_dma_chan *chan = &dw->chan[i]; in dw_probe()
897 vchan_init(&chan->vc, &dw->dma); in dw_probe()
901 dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask); in dw_probe()
904 dw->dma.chancnt = hdata->nr_channels; in dw_probe()
905 dw->dma.src_addr_widths = AXI_DMA_BUSWIDTHS; in dw_probe()
906 dw->dma.dst_addr_widths = AXI_DMA_BUSWIDTHS; in dw_probe()
907 dw->dma.directions = BIT(DMA_MEM_TO_MEM); in dw_probe()
908 dw->dma.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR; in dw_probe()
910 dw->dma.dev = chip->dev; in dw_probe()
911 dw->dma.device_tx_status = dma_chan_tx_status; in dw_probe()
912 dw->dma.device_issue_pending = dma_chan_issue_pending; in dw_probe()
913 dw->dma.device_terminate_all = dma_chan_terminate_all; in dw_probe()
914 dw->dma.device_pause = dma_chan_pause; in dw_probe()
915 dw->dma.device_resume = dma_chan_resume; in dw_probe()
917 dw->dma.device_alloc_chan_resources = dma_chan_alloc_chan_resources; in dw_probe()
918 dw->dma.device_free_chan_resources = dma_chan_free_chan_resources; in dw_probe()
920 dw->dma.device_prep_dma_memcpy = dma_chan_prep_dma_memcpy; in dw_probe()
940 ret = dmaenginem_async_device_register(&dw->dma); in dw_probe()
945 dw->hdata->nr_channels); in dw_probe()
958 struct dw_axi_dma *dw = chip->dw; in dw_remove() local
966 for (i = 0; i < dw->hdata->nr_channels; i++) { in dw_remove()
967 axi_chan_disable(&chip->dw->chan[i]); in dw_remove()
968 axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL); in dw_remove()
977 list_for_each_entry_safe(chan, _chan, &dw->dma.channels, in dw_remove()