• Home
  • Raw
  • Download

Lines Matching refs:tdev

330 	struct mmp_tdma_device *tdev = dev_id;  in mmp_tdma_int_handler()  local
335 struct mmp_tdma_chan *tdmac = tdev->tdmac[i]; in mmp_tdma_int_handler()
533 struct mmp_tdma_device *tdev = platform_get_drvdata(pdev); in mmp_tdma_remove() local
535 dma_async_device_unregister(&tdev->device); in mmp_tdma_remove()
539 static int mmp_tdma_chan_init(struct mmp_tdma_device *tdev, in mmp_tdma_chan_init() argument
546 dev_err(tdev->dev, "too many channels for device!\n"); in mmp_tdma_chan_init()
551 tdmac = devm_kzalloc(tdev->dev, sizeof(*tdmac), GFP_KERNEL); in mmp_tdma_chan_init()
557 tdmac->dev = tdev->dev; in mmp_tdma_chan_init()
558 tdmac->chan.device = &tdev->device; in mmp_tdma_chan_init()
561 tdmac->reg_base = tdev->base + idx * 4; in mmp_tdma_chan_init()
564 tdev->tdmac[tdmac->idx] = tdmac; in mmp_tdma_chan_init()
569 &tdev->device.channels); in mmp_tdma_chan_init()
596 struct mmp_tdma_device *tdev = ofdma->of_dma_data; in mmp_tdma_xlate() local
597 dma_cap_mask_t mask = tdev->device.cap_mask; in mmp_tdma_xlate()
623 struct mmp_tdma_device *tdev; in mmp_tdma_probe() local
637 tdev = devm_kzalloc(&pdev->dev, sizeof(*tdev), GFP_KERNEL); in mmp_tdma_probe()
638 if (!tdev) in mmp_tdma_probe()
641 tdev->dev = &pdev->dev; in mmp_tdma_probe()
649 tdev->base = devm_ioremap_resource(&pdev->dev, iores); in mmp_tdma_probe()
650 if (IS_ERR(tdev->base)) in mmp_tdma_probe()
651 return PTR_ERR(tdev->base); in mmp_tdma_probe()
653 INIT_LIST_HEAD(&tdev->device.channels); in mmp_tdma_probe()
667 mmp_tdma_int_handler, 0, "tdma", tdev); in mmp_tdma_probe()
675 ret = mmp_tdma_chan_init(tdev, i, irq, type, pool); in mmp_tdma_probe()
680 dma_cap_set(DMA_SLAVE, tdev->device.cap_mask); in mmp_tdma_probe()
681 dma_cap_set(DMA_CYCLIC, tdev->device.cap_mask); in mmp_tdma_probe()
682 tdev->device.dev = &pdev->dev; in mmp_tdma_probe()
683 tdev->device.device_alloc_chan_resources = in mmp_tdma_probe()
685 tdev->device.device_free_chan_resources = in mmp_tdma_probe()
687 tdev->device.device_prep_dma_cyclic = mmp_tdma_prep_dma_cyclic; in mmp_tdma_probe()
688 tdev->device.device_tx_status = mmp_tdma_tx_status; in mmp_tdma_probe()
689 tdev->device.device_issue_pending = mmp_tdma_issue_pending; in mmp_tdma_probe()
690 tdev->device.device_config = mmp_tdma_config; in mmp_tdma_probe()
691 tdev->device.device_pause = mmp_tdma_pause_chan; in mmp_tdma_probe()
692 tdev->device.device_resume = mmp_tdma_resume_chan; in mmp_tdma_probe()
693 tdev->device.device_terminate_all = mmp_tdma_terminate_all; in mmp_tdma_probe()
694 tdev->device.copy_align = DMAENGINE_ALIGN_8_BYTES; in mmp_tdma_probe()
697 platform_set_drvdata(pdev, tdev); in mmp_tdma_probe()
699 ret = dma_async_device_register(&tdev->device); in mmp_tdma_probe()
701 dev_err(tdev->device.dev, "unable to register\n"); in mmp_tdma_probe()
707 mmp_tdma_xlate, tdev); in mmp_tdma_probe()
709 dev_err(tdev->device.dev, in mmp_tdma_probe()
711 dma_async_device_unregister(&tdev->device); in mmp_tdma_probe()
715 dev_info(tdev->device.dev, "initialized\n"); in mmp_tdma_probe()