Lines Matching refs:tdev

331 	struct mmp_tdma_device *tdev = dev_id;  in mmp_tdma_int_handler()  local
336 struct mmp_tdma_chan *tdmac = tdev->tdmac[i]; in mmp_tdma_int_handler()
550 static int mmp_tdma_chan_init(struct mmp_tdma_device *tdev, in mmp_tdma_chan_init() argument
557 dev_err(tdev->dev, "too many channels for device!\n"); in mmp_tdma_chan_init()
562 tdmac = devm_kzalloc(tdev->dev, sizeof(*tdmac), GFP_KERNEL); in mmp_tdma_chan_init()
568 tdmac->dev = tdev->dev; in mmp_tdma_chan_init()
569 tdmac->chan.device = &tdev->device; in mmp_tdma_chan_init()
572 tdmac->reg_base = tdev->base + idx * 4; in mmp_tdma_chan_init()
575 tdev->tdmac[tdmac->idx] = tdmac; in mmp_tdma_chan_init()
580 &tdev->device.channels); in mmp_tdma_chan_init()
601 struct mmp_tdma_device *tdev = ofdma->of_dma_data; in mmp_tdma_xlate() local
602 dma_cap_mask_t mask = tdev->device.cap_mask; in mmp_tdma_xlate()
628 struct mmp_tdma_device *tdev; in mmp_tdma_probe() local
642 tdev = devm_kzalloc(&pdev->dev, sizeof(*tdev), GFP_KERNEL); in mmp_tdma_probe()
643 if (!tdev) in mmp_tdma_probe()
646 tdev->dev = &pdev->dev; in mmp_tdma_probe()
654 tdev->base = devm_ioremap_resource(&pdev->dev, iores); in mmp_tdma_probe()
655 if (IS_ERR(tdev->base)) in mmp_tdma_probe()
656 return PTR_ERR(tdev->base); in mmp_tdma_probe()
658 INIT_LIST_HEAD(&tdev->device.channels); in mmp_tdma_probe()
672 mmp_tdma_int_handler, 0, "tdma", tdev); in mmp_tdma_probe()
680 ret = mmp_tdma_chan_init(tdev, i, irq, type, pool); in mmp_tdma_probe()
685 dma_cap_set(DMA_SLAVE, tdev->device.cap_mask); in mmp_tdma_probe()
686 dma_cap_set(DMA_CYCLIC, tdev->device.cap_mask); in mmp_tdma_probe()
687 tdev->device.dev = &pdev->dev; in mmp_tdma_probe()
688 tdev->device.device_alloc_chan_resources = in mmp_tdma_probe()
690 tdev->device.device_free_chan_resources = in mmp_tdma_probe()
692 tdev->device.device_prep_dma_cyclic = mmp_tdma_prep_dma_cyclic; in mmp_tdma_probe()
693 tdev->device.device_tx_status = mmp_tdma_tx_status; in mmp_tdma_probe()
694 tdev->device.device_issue_pending = mmp_tdma_issue_pending; in mmp_tdma_probe()
695 tdev->device.device_config = mmp_tdma_config; in mmp_tdma_probe()
696 tdev->device.device_pause = mmp_tdma_pause_chan; in mmp_tdma_probe()
697 tdev->device.device_resume = mmp_tdma_resume_chan; in mmp_tdma_probe()
698 tdev->device.device_terminate_all = mmp_tdma_terminate_all; in mmp_tdma_probe()
699 tdev->device.copy_align = DMAENGINE_ALIGN_8_BYTES; in mmp_tdma_probe()
702 platform_set_drvdata(pdev, tdev); in mmp_tdma_probe()
704 ret = dmaenginem_async_device_register(&tdev->device); in mmp_tdma_probe()
706 dev_err(tdev->device.dev, "unable to register\n"); in mmp_tdma_probe()
712 mmp_tdma_xlate, tdev); in mmp_tdma_probe()
714 dev_err(tdev->device.dev, in mmp_tdma_probe()
720 dev_info(tdev->device.dev, "initialized\n"); in mmp_tdma_probe()