mtkd              142 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd =
mtkd              155 drivers/dma/mediatek/mtk-uart-apdma.c 		if (mtkd->support_33bits)
mtkd              185 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd =
mtkd              198 drivers/dma/mediatek/mtk-uart-apdma.c 		if (mtkd->support_33bits)
mtkd              271 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = to_mtk_uart_apdma_dev(chan->device);
mtkd              276 drivers/dma/mediatek/mtk-uart-apdma.c 	ret = pm_runtime_get_sync(mtkd->ddev.dev);
mtkd              299 drivers/dma/mediatek/mtk-uart-apdma.c 	if (mtkd->support_33bits)
mtkd              307 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = to_mtk_uart_apdma_dev(chan->device);
mtkd              316 drivers/dma/mediatek/mtk-uart-apdma.c 	pm_runtime_put_sync(mtkd->ddev.dev);
mtkd              456 drivers/dma/mediatek/mtk-uart-apdma.c static void mtk_uart_apdma_free(struct mtk_uart_apdmadev *mtkd)
mtkd              458 drivers/dma/mediatek/mtk-uart-apdma.c 	while (!list_empty(&mtkd->ddev.channels)) {
mtkd              459 drivers/dma/mediatek/mtk-uart-apdma.c 		struct mtk_chan *c = list_first_entry(&mtkd->ddev.channels,
mtkd              476 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd;
mtkd              482 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd = devm_kzalloc(&pdev->dev, sizeof(*mtkd), GFP_KERNEL);
mtkd              483 drivers/dma/mediatek/mtk-uart-apdma.c 	if (!mtkd)
mtkd              486 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->clk = devm_clk_get(&pdev->dev, NULL);
mtkd              487 drivers/dma/mediatek/mtk-uart-apdma.c 	if (IS_ERR(mtkd->clk)) {
mtkd              489 drivers/dma/mediatek/mtk-uart-apdma.c 		rc = PTR_ERR(mtkd->clk);
mtkd              494 drivers/dma/mediatek/mtk-uart-apdma.c 		mtkd->support_33bits = true;
mtkd              496 drivers/dma/mediatek/mtk-uart-apdma.c 	if (mtkd->support_33bits)
mtkd              503 drivers/dma/mediatek/mtk-uart-apdma.c 	dma_cap_set(DMA_SLAVE, mtkd->ddev.cap_mask);
mtkd              504 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_alloc_chan_resources =
mtkd              506 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_free_chan_resources =
mtkd              508 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_tx_status = mtk_uart_apdma_tx_status;
mtkd              509 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_issue_pending = mtk_uart_apdma_issue_pending;
mtkd              510 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_prep_slave_sg = mtk_uart_apdma_prep_slave_sg;
mtkd              511 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_config = mtk_uart_apdma_slave_config;
mtkd              512 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_pause = mtk_uart_apdma_device_pause;
mtkd              513 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.device_terminate_all = mtk_uart_apdma_terminate_all;
mtkd              514 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE);
mtkd              515 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE);
mtkd              516 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
mtkd              517 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
mtkd              518 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->ddev.dev = &pdev->dev;
mtkd              519 drivers/dma/mediatek/mtk-uart-apdma.c 	INIT_LIST_HEAD(&mtkd->ddev.channels);
mtkd              521 drivers/dma/mediatek/mtk-uart-apdma.c 	mtkd->dma_requests = MTK_UART_APDMA_NR_VCHANS;
mtkd              522 drivers/dma/mediatek/mtk-uart-apdma.c 	if (of_property_read_u32(np, "dma-requests", &mtkd->dma_requests)) {
mtkd              528 drivers/dma/mediatek/mtk-uart-apdma.c 	for (i = 0; i < mtkd->dma_requests; i++) {
mtkd              529 drivers/dma/mediatek/mtk-uart-apdma.c 		c = devm_kzalloc(mtkd->ddev.dev, sizeof(*c), GFP_KERNEL);
mtkd              547 drivers/dma/mediatek/mtk-uart-apdma.c 		vchan_init(&c->vc, &mtkd->ddev);
mtkd              558 drivers/dma/mediatek/mtk-uart-apdma.c 	rc = dma_async_device_register(&mtkd->ddev);
mtkd              562 drivers/dma/mediatek/mtk-uart-apdma.c 	platform_set_drvdata(pdev, mtkd);
mtkd              565 drivers/dma/mediatek/mtk-uart-apdma.c 	rc = of_dma_controller_register(np, of_dma_xlate_by_chan_id, mtkd);
mtkd              572 drivers/dma/mediatek/mtk-uart-apdma.c 	dma_async_device_unregister(&mtkd->ddev);
mtkd              576 drivers/dma/mediatek/mtk-uart-apdma.c 	mtk_uart_apdma_free(mtkd);
mtkd              582 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = platform_get_drvdata(pdev);
mtkd              586 drivers/dma/mediatek/mtk-uart-apdma.c 	mtk_uart_apdma_free(mtkd);
mtkd              588 drivers/dma/mediatek/mtk-uart-apdma.c 	dma_async_device_unregister(&mtkd->ddev);
mtkd              598 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = dev_get_drvdata(dev);
mtkd              601 drivers/dma/mediatek/mtk-uart-apdma.c 		clk_disable_unprepare(mtkd->clk);
mtkd              609 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = dev_get_drvdata(dev);
mtkd              612 drivers/dma/mediatek/mtk-uart-apdma.c 		ret = clk_prepare_enable(mtkd->clk);
mtkd              624 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = dev_get_drvdata(dev);
mtkd              626 drivers/dma/mediatek/mtk-uart-apdma.c 	clk_disable_unprepare(mtkd->clk);
mtkd              634 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = dev_get_drvdata(dev);
mtkd              636 drivers/dma/mediatek/mtk-uart-apdma.c 	ret = clk_prepare_enable(mtkd->clk);