• Home
  • Raw
  • Download

Lines Matching full:tdma

237 	struct tegra_dma *tdma;  member
263 writel_relaxed(val, tdc->tdma->base_addr + tdc->chan_base_offset + reg); in tdc_write()
268 return readl_relaxed(tdc->tdma->base_addr + tdc->chan_base_offset + reg); in tdc_read()
311 struct tegra_dma *tdma = tdc->tdma; in tegra_dma_sid_reserve() local
319 if (test_and_set_bit(sid, &tdma->sid_m2d_reserved)) { in tegra_dma_sid_reserve()
320 dev_err(tdma->dev, "slave id already in use\n"); in tegra_dma_sid_reserve()
325 if (test_and_set_bit(sid, &tdma->sid_d2m_reserved)) { in tegra_dma_sid_reserve()
326 dev_err(tdma->dev, "slave id already in use\n"); in tegra_dma_sid_reserve()
341 struct tegra_dma *tdma = tdc->tdma; in tegra_dma_sid_free() local
346 clear_bit(sid, &tdma->sid_m2d_reserved); in tegra_dma_sid_free()
349 clear_bit(sid, &tdma->sid_d2m_reserved); in tegra_dma_sid_free()
384 ret = readl_relaxed_poll_timeout_atomic(tdc->tdma->base_addr + in tegra_dma_pause()
405 if (!tdc->tdma->chip_data->hw_support_pause) in tegra_dma_device_pause()
429 if (!tdc->tdma->chip_data->hw_support_pause) in tegra_dma_device_resume()
485 ret = readl_relaxed_poll_timeout_atomic(tdc->tdma->base_addr + in tegra_dma_configure_next_sg()
554 dev_err(tdc->tdma->dev, in tegra_dma_chan_decode_error()
559 dev_err(tdc->tdma->dev, in tegra_dma_chan_decode_error()
564 dev_err(tdc->tdma->dev, in tegra_dma_chan_decode_error()
569 dev_err(tdc->tdma->dev, in tegra_dma_chan_decode_error()
574 dev_err(tdc->tdma->dev, in tegra_dma_chan_decode_error()
579 dev_err(tdc->tdma->dev, in tegra_dma_chan_decode_error()
584 dev_err(tdc->tdma->dev, in tegra_dma_chan_decode_error()
682 ret = readl_relaxed_poll_timeout_atomic(tdc->tdma->base_addr + in tegra_dma_stop_client()
708 err = tdc->tdma->chip_data->terminate(tdc); in tegra_dma_terminate_all()
860 unsigned int max_dma_count = tdc->tdma->chip_data->max_dma_count; in tegra_dma_prep_dma_memset()
932 max_dma_count = tdc->tdma->chip_data->max_dma_count; in tegra_dma_prep_dma_memcpy()
998 unsigned int max_dma_count = tdc->tdma->chip_data->max_dma_count; in tegra_dma_prep_slave_sg()
1150 max_dma_count = tdc->tdma->chip_data->max_dma_count; in tegra_dma_prep_dma_cyclic()
1281 struct tegra_dma *tdma = ofdma->of_dma_data; in tegra_dma_of_xlate() local
1285 chan = dma_get_any_slave_channel(&tdma->dma_dev); in tegra_dma_of_xlate()
1353 struct tegra_dma *tdma; in tegra_dma_probe() local
1358 tdma = devm_kzalloc(&pdev->dev, in tegra_dma_probe()
1359 struct_size(tdma, channels, cdata->nr_channels), in tegra_dma_probe()
1361 if (!tdma) in tegra_dma_probe()
1364 tdma->dev = &pdev->dev; in tegra_dma_probe()
1365 tdma->chip_data = cdata; in tegra_dma_probe()
1366 platform_set_drvdata(pdev, tdma); in tegra_dma_probe()
1368 tdma->base_addr = devm_platform_ioremap_resource(pdev, 0); in tegra_dma_probe()
1369 if (IS_ERR(tdma->base_addr)) in tegra_dma_probe()
1370 return PTR_ERR(tdma->base_addr); in tegra_dma_probe()
1372 tdma->rst = devm_reset_control_get_exclusive(&pdev->dev, "gpcdma"); in tegra_dma_probe()
1373 if (IS_ERR(tdma->rst)) { in tegra_dma_probe()
1374 return dev_err_probe(&pdev->dev, PTR_ERR(tdma->rst), in tegra_dma_probe()
1377 reset_control_reset(tdma->rst); in tegra_dma_probe()
1379 tdma->dma_dev.dev = &pdev->dev; in tegra_dma_probe()
1389 &tdma->chan_mask); in tegra_dma_probe()
1394 tdma->chan_mask = TEGRA_GPCDMA_DEFAULT_CHANNEL_MASK; in tegra_dma_probe()
1397 INIT_LIST_HEAD(&tdma->dma_dev.channels); in tegra_dma_probe()
1399 struct tegra_dma_channel *tdc = &tdma->channels[i]; in tegra_dma_probe()
1402 if (!(tdma->chan_mask & BIT(i))) in tegra_dma_probe()
1412 tdc->tdma = tdma; in tegra_dma_probe()
1416 vchan_init(&tdc->vc, &tdma->dma_dev); in tegra_dma_probe()
1424 dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask); in tegra_dma_probe()
1425 dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask); in tegra_dma_probe()
1426 dma_cap_set(DMA_MEMCPY, tdma->dma_dev.cap_mask); in tegra_dma_probe()
1427 dma_cap_set(DMA_MEMSET, tdma->dma_dev.cap_mask); in tegra_dma_probe()
1428 dma_cap_set(DMA_CYCLIC, tdma->dma_dev.cap_mask); in tegra_dma_probe()
1434 tdma->dma_dev.copy_align = 2; in tegra_dma_probe()
1435 tdma->dma_dev.fill_align = 2; in tegra_dma_probe()
1436 tdma->dma_dev.device_alloc_chan_resources = in tegra_dma_probe()
1438 tdma->dma_dev.device_free_chan_resources = in tegra_dma_probe()
1440 tdma->dma_dev.device_prep_slave_sg = tegra_dma_prep_slave_sg; in tegra_dma_probe()
1441 tdma->dma_dev.device_prep_dma_memcpy = tegra_dma_prep_dma_memcpy; in tegra_dma_probe()
1442 tdma->dma_dev.device_prep_dma_memset = tegra_dma_prep_dma_memset; in tegra_dma_probe()
1443 tdma->dma_dev.device_prep_dma_cyclic = tegra_dma_prep_dma_cyclic; in tegra_dma_probe()
1444 tdma->dma_dev.device_config = tegra_dma_slave_config; in tegra_dma_probe()
1445 tdma->dma_dev.device_terminate_all = tegra_dma_terminate_all; in tegra_dma_probe()
1446 tdma->dma_dev.device_tx_status = tegra_dma_tx_status; in tegra_dma_probe()
1447 tdma->dma_dev.device_issue_pending = tegra_dma_issue_pending; in tegra_dma_probe()
1448 tdma->dma_dev.device_pause = tegra_dma_device_pause; in tegra_dma_probe()
1449 tdma->dma_dev.device_resume = tegra_dma_device_resume; in tegra_dma_probe()
1450 tdma->dma_dev.device_synchronize = tegra_dma_chan_synchronize; in tegra_dma_probe()
1451 tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; in tegra_dma_probe()
1453 ret = dma_async_device_register(&tdma->dma_dev); in tegra_dma_probe()
1461 tegra_dma_of_xlate, tdma); in tegra_dma_probe()
1466 dma_async_device_unregister(&tdma->dma_dev); in tegra_dma_probe()
1471 hweight_long(tdma->chan_mask)); in tegra_dma_probe()
1478 struct tegra_dma *tdma = platform_get_drvdata(pdev); in tegra_dma_remove() local
1481 dma_async_device_unregister(&tdma->dma_dev); in tegra_dma_remove()
1488 struct tegra_dma *tdma = dev_get_drvdata(dev); in tegra_dma_pm_suspend() local
1491 for (i = 0; i < tdma->chip_data->nr_channels; i++) { in tegra_dma_pm_suspend()
1492 struct tegra_dma_channel *tdc = &tdma->channels[i]; in tegra_dma_pm_suspend()
1494 if (!(tdma->chan_mask & BIT(i))) in tegra_dma_pm_suspend()
1498 dev_err(tdma->dev, "channel %u busy\n", i); in tegra_dma_pm_suspend()
1508 struct tegra_dma *tdma = dev_get_drvdata(dev); in tegra_dma_pm_resume() local
1511 reset_control_reset(tdma->rst); in tegra_dma_pm_resume()
1513 for (i = 0; i < tdma->chip_data->nr_channels; i++) { in tegra_dma_pm_resume()
1514 struct tegra_dma_channel *tdc = &tdma->channels[i]; in tegra_dma_pm_resume()
1516 if (!(tdma->chan_mask & BIT(i))) in tegra_dma_pm_resume()