Lines Matching refs:s3cdma

264 	struct s3c24xx_dma_engine *s3cdma = s3cchan->host;  in s3c24xx_dma_phy_valid()  local
265 const struct s3c24xx_dma_platdata *pdata = s3cdma->pdata; in s3c24xx_dma_phy_valid()
274 if (s3cdma->sdata->has_reqsel) in s3c24xx_dma_phy_valid()
291 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_get_phy() local
292 const struct s3c24xx_dma_platdata *pdata = s3cdma->pdata; in s3c24xx_dma_get_phy()
302 for (i = 0; i < s3cdma->pdata->num_phy_channels; i++) { in s3c24xx_dma_get_phy()
303 phy = &s3cdma->phy_chans[i]; in s3c24xx_dma_get_phy()
323 if (i == s3cdma->pdata->num_phy_channels) { in s3c24xx_dma_get_phy()
324 dev_warn(&s3cdma->pdev->dev, "no phy channel available\n"); in s3c24xx_dma_get_phy()
329 if (s3cdma->sdata->has_clocks) { in s3c24xx_dma_get_phy()
332 dev_err(&s3cdma->pdev->dev, "could not enable clock for channel %d, err %d\n", in s3c24xx_dma_get_phy()
349 struct s3c24xx_dma_engine *s3cdma = phy->host; in s3c24xx_dma_put_phy() local
351 if (s3cdma->sdata->has_clocks) in s3c24xx_dma_put_phy()
450 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_start_next_sg() local
452 const struct s3c24xx_dma_platdata *pdata = s3cdma->pdata; in s3c24xx_dma_start_next_sg()
474 if (s3cdma->sdata->has_reqsel) { in s3c24xx_dma_start_next_sg()
487 if (s3cdma->sdata->has_reqsel) in s3c24xx_dma_start_next_sg()
530 static void s3c24xx_dma_free_txd_list(struct s3c24xx_dma_engine *s3cdma, in s3c24xx_dma_free_txd_list() argument
546 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_phy_alloc_and_start() local
551 dev_dbg(&s3cdma->pdev->dev, "no physical channel available for xfer on %s\n", in s3c24xx_dma_phy_alloc_and_start()
557 dev_dbg(&s3cdma->pdev->dev, "allocated physical channel %d for xfer on %s\n", in s3c24xx_dma_phy_alloc_and_start()
569 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_phy_reassign_start() local
571 dev_dbg(&s3cdma->pdev->dev, "reassigned physical channel %d for xfer on %s\n", in s3c24xx_dma_phy_reassign_start()
591 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_phy_free() local
598 list_for_each_entry(p, &s3cdma->memcpy.channels, vc.chan.device_node) in s3c24xx_dma_phy_free()
605 list_for_each_entry(p, &s3cdma->slave.channels, in s3c24xx_dma_phy_free()
719 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_terminate_all() local
726 dev_err(&s3cdma->pdev->dev, "trying to terminate already stopped channel %d\n", in s3c24xx_dma_terminate_all()
745 s3c24xx_dma_free_txd_list(s3cdma, s3cchan); in s3c24xx_dma_terminate_all()
825 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_prep_memcpy() local
830 dev_dbg(&s3cdma->pdev->dev, "prepare memcpy of %d bytes from %s\n", in s3c24xx_dma_prep_memcpy()
834 dev_err(&s3cdma->pdev->dev, "memcpy size %d to large\n", len); in s3c24xx_dma_prep_memcpy()
887 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_prep_dma_cyclic() local
888 const struct s3c24xx_dma_platdata *pdata = s3cdma->pdata; in s3c24xx_dma_prep_dma_cyclic()
897 dev_dbg(&s3cdma->pdev->dev, in s3c24xx_dma_prep_dma_cyclic()
902 dev_err(&s3cdma->pdev->dev, in s3c24xx_dma_prep_dma_cyclic()
985 struct s3c24xx_dma_engine *s3cdma = s3cchan->host; in s3c24xx_dma_prep_slave_sg() local
986 const struct s3c24xx_dma_platdata *pdata = s3cdma->pdata; in s3c24xx_dma_prep_slave_sg()
995 dev_dbg(&s3cdma->pdev->dev, "prepare transaction of %d bytes from %s\n", in s3c24xx_dma_prep_slave_sg()
1042 dev_err(&s3cdma->pdev->dev, in s3c24xx_dma_prep_slave_sg()
1093 static int s3c24xx_dma_init_virtual_channels(struct s3c24xx_dma_engine *s3cdma, in s3c24xx_dma_init_virtual_channels() argument
1115 chan->host = s3cdma; in s3c24xx_dma_init_virtual_channels()
1194 struct s3c24xx_dma_engine *s3cdma; in s3c24xx_dma_probe() local
1216 s3cdma = devm_kzalloc(&pdev->dev, sizeof(*s3cdma), GFP_KERNEL); in s3c24xx_dma_probe()
1217 if (!s3cdma) in s3c24xx_dma_probe()
1220 s3cdma->pdev = pdev; in s3c24xx_dma_probe()
1221 s3cdma->pdata = pdata; in s3c24xx_dma_probe()
1222 s3cdma->sdata = sdata; in s3c24xx_dma_probe()
1225 s3cdma->base = devm_ioremap_resource(&pdev->dev, res); in s3c24xx_dma_probe()
1226 if (IS_ERR(s3cdma->base)) in s3c24xx_dma_probe()
1227 return PTR_ERR(s3cdma->base); in s3c24xx_dma_probe()
1229 s3cdma->phy_chans = devm_kzalloc(&pdev->dev, in s3c24xx_dma_probe()
1233 if (!s3cdma->phy_chans) in s3c24xx_dma_probe()
1238 struct s3c24xx_dma_phy *phy = &s3cdma->phy_chans[i]; in s3c24xx_dma_probe()
1242 phy->base = s3cdma->base + (i * sdata->stride); in s3c24xx_dma_probe()
1243 phy->host = s3cdma; in s3c24xx_dma_probe()
1285 dma_cap_set(DMA_MEMCPY, s3cdma->memcpy.cap_mask); in s3c24xx_dma_probe()
1286 dma_cap_set(DMA_PRIVATE, s3cdma->memcpy.cap_mask); in s3c24xx_dma_probe()
1287 s3cdma->memcpy.dev = &pdev->dev; in s3c24xx_dma_probe()
1288 s3cdma->memcpy.device_free_chan_resources = in s3c24xx_dma_probe()
1290 s3cdma->memcpy.device_prep_dma_memcpy = s3c24xx_dma_prep_memcpy; in s3c24xx_dma_probe()
1291 s3cdma->memcpy.device_tx_status = s3c24xx_dma_tx_status; in s3c24xx_dma_probe()
1292 s3cdma->memcpy.device_issue_pending = s3c24xx_dma_issue_pending; in s3c24xx_dma_probe()
1293 s3cdma->memcpy.device_config = s3c24xx_dma_set_runtime_config; in s3c24xx_dma_probe()
1294 s3cdma->memcpy.device_terminate_all = s3c24xx_dma_terminate_all; in s3c24xx_dma_probe()
1297 dma_cap_set(DMA_SLAVE, s3cdma->slave.cap_mask); in s3c24xx_dma_probe()
1298 dma_cap_set(DMA_CYCLIC, s3cdma->slave.cap_mask); in s3c24xx_dma_probe()
1299 dma_cap_set(DMA_PRIVATE, s3cdma->slave.cap_mask); in s3c24xx_dma_probe()
1300 s3cdma->slave.dev = &pdev->dev; in s3c24xx_dma_probe()
1301 s3cdma->slave.device_free_chan_resources = in s3c24xx_dma_probe()
1303 s3cdma->slave.device_tx_status = s3c24xx_dma_tx_status; in s3c24xx_dma_probe()
1304 s3cdma->slave.device_issue_pending = s3c24xx_dma_issue_pending; in s3c24xx_dma_probe()
1305 s3cdma->slave.device_prep_slave_sg = s3c24xx_dma_prep_slave_sg; in s3c24xx_dma_probe()
1306 s3cdma->slave.device_prep_dma_cyclic = s3c24xx_dma_prep_dma_cyclic; in s3c24xx_dma_probe()
1307 s3cdma->slave.device_config = s3c24xx_dma_set_runtime_config; in s3c24xx_dma_probe()
1308 s3cdma->slave.device_terminate_all = s3c24xx_dma_terminate_all; in s3c24xx_dma_probe()
1311 ret = s3c24xx_dma_init_virtual_channels(s3cdma, &s3cdma->memcpy, in s3c24xx_dma_probe()
1321 ret = s3c24xx_dma_init_virtual_channels(s3cdma, &s3cdma->slave, in s3c24xx_dma_probe()
1330 ret = dma_async_device_register(&s3cdma->memcpy); in s3c24xx_dma_probe()
1338 ret = dma_async_device_register(&s3cdma->slave); in s3c24xx_dma_probe()
1346 platform_set_drvdata(pdev, s3cdma); in s3c24xx_dma_probe()
1353 dma_async_device_unregister(&s3cdma->memcpy); in s3c24xx_dma_probe()
1355 s3c24xx_dma_free_virtual_channels(&s3cdma->slave); in s3c24xx_dma_probe()
1357 s3c24xx_dma_free_virtual_channels(&s3cdma->memcpy); in s3c24xx_dma_probe()
1361 struct s3c24xx_dma_phy *phy = &s3cdma->phy_chans[i]; in s3c24xx_dma_probe()
1372 struct s3c24xx_dma_engine *s3cdma = platform_get_drvdata(pdev); in s3c24xx_dma_remove() local
1376 dma_async_device_unregister(&s3cdma->slave); in s3c24xx_dma_remove()
1377 dma_async_device_unregister(&s3cdma->memcpy); in s3c24xx_dma_remove()
1379 s3c24xx_dma_free_virtual_channels(&s3cdma->slave); in s3c24xx_dma_remove()
1380 s3c24xx_dma_free_virtual_channels(&s3cdma->memcpy); in s3c24xx_dma_remove()
1384 struct s3c24xx_dma_phy *phy = &s3cdma->phy_chans[i]; in s3c24xx_dma_remove()