xor_dev           187 drivers/dma/mv_xor_v2.c static void mv_xor_v2_set_data_buffers(struct mv_xor_v2_device *xor_dev,
xor_dev           223 drivers/dma/mv_xor_v2.c static void mv_xor_v2_add_desc_to_desq(struct mv_xor_v2_device *xor_dev,
xor_dev           227 drivers/dma/mv_xor_v2.c 	writel(num_of_desc, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_ADD_OFF);
xor_dev           233 drivers/dma/mv_xor_v2.c static void mv_xor_v2_free_desc_from_desq(struct mv_xor_v2_device *xor_dev,
xor_dev           237 drivers/dma/mv_xor_v2.c 	writel(num_of_desc, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_DEALLOC_OFF);
xor_dev           244 drivers/dma/mv_xor_v2.c static int mv_xor_v2_set_desc_size(struct mv_xor_v2_device *xor_dev)
xor_dev           247 drivers/dma/mv_xor_v2.c 	       xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_CTRL_OFF);
xor_dev           256 drivers/dma/mv_xor_v2.c void mv_xor_v2_enable_imsg_thrd(struct mv_xor_v2_device *xor_dev)
xor_dev           261 drivers/dma/mv_xor_v2.c 	reg = readl(xor_dev->dma_base + MV_XOR_V2_DMA_IMSG_THRD_OFF);
xor_dev           265 drivers/dma/mv_xor_v2.c 	writel(reg, xor_dev->dma_base + MV_XOR_V2_DMA_IMSG_THRD_OFF);
xor_dev           268 drivers/dma/mv_xor_v2.c 	reg = readl(xor_dev->dma_base + MV_XOR_V2_DMA_IMSG_TMOT);
xor_dev           271 drivers/dma/mv_xor_v2.c 	writel(reg, xor_dev->dma_base + MV_XOR_V2_DMA_IMSG_TMOT);
xor_dev           276 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev = data;
xor_dev           280 drivers/dma/mv_xor_v2.c 	reg = readl(xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_DONE_OFF);
xor_dev           290 drivers/dma/mv_xor_v2.c 	tasklet_schedule(&xor_dev->irq_tasklet);
xor_dev           305 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev =
xor_dev           308 drivers/dma/mv_xor_v2.c 	dev_dbg(xor_dev->dmadev.dev,
xor_dev           313 drivers/dma/mv_xor_v2.c 	spin_lock_bh(&xor_dev->lock);
xor_dev           317 drivers/dma/mv_xor_v2.c 	dest_hw_desc = xor_dev->hw_desq_virt + xor_dev->hw_queue_idx;
xor_dev           319 drivers/dma/mv_xor_v2.c 	memcpy(dest_hw_desc, &sw_desc->hw_desc, xor_dev->desc_size);
xor_dev           321 drivers/dma/mv_xor_v2.c 	xor_dev->npendings++;
xor_dev           322 drivers/dma/mv_xor_v2.c 	xor_dev->hw_queue_idx++;
xor_dev           323 drivers/dma/mv_xor_v2.c 	if (xor_dev->hw_queue_idx >= MV_XOR_V2_DESC_NUM)
xor_dev           324 drivers/dma/mv_xor_v2.c 		xor_dev->hw_queue_idx = 0;
xor_dev           326 drivers/dma/mv_xor_v2.c 	spin_unlock_bh(&xor_dev->lock);
xor_dev           335 drivers/dma/mv_xor_v2.c mv_xor_v2_prep_sw_desc(struct mv_xor_v2_device *xor_dev)
xor_dev           341 drivers/dma/mv_xor_v2.c 	spin_lock_bh(&xor_dev->lock);
xor_dev           343 drivers/dma/mv_xor_v2.c 	if (list_empty(&xor_dev->free_sw_desc)) {
xor_dev           344 drivers/dma/mv_xor_v2.c 		spin_unlock_bh(&xor_dev->lock);
xor_dev           346 drivers/dma/mv_xor_v2.c 		tasklet_schedule(&xor_dev->irq_tasklet);
xor_dev           350 drivers/dma/mv_xor_v2.c 	list_for_each_entry(sw_desc, &xor_dev->free_sw_desc, free_list) {
xor_dev           358 drivers/dma/mv_xor_v2.c 		spin_unlock_bh(&xor_dev->lock);
xor_dev           365 drivers/dma/mv_xor_v2.c 	spin_unlock_bh(&xor_dev->lock);
xor_dev           379 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device	*xor_dev;
xor_dev           381 drivers/dma/mv_xor_v2.c 	xor_dev = container_of(chan, struct mv_xor_v2_device, dmachan);
xor_dev           383 drivers/dma/mv_xor_v2.c 	dev_dbg(xor_dev->dmadev.dev,
xor_dev           387 drivers/dma/mv_xor_v2.c 	sw_desc = mv_xor_v2_prep_sw_desc(xor_dev);
xor_dev           432 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device	*xor_dev =
xor_dev           439 drivers/dma/mv_xor_v2.c 	dev_dbg(xor_dev->dmadev.dev,
xor_dev           443 drivers/dma/mv_xor_v2.c 	sw_desc = mv_xor_v2_prep_sw_desc(xor_dev);
xor_dev           465 drivers/dma/mv_xor_v2.c 		mv_xor_v2_set_data_buffers(xor_dev, hw_descriptor, src[i], i);
xor_dev           490 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device	*xor_dev =
xor_dev           493 drivers/dma/mv_xor_v2.c 	sw_desc = mv_xor_v2_prep_sw_desc(xor_dev);
xor_dev           517 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev =
xor_dev           520 drivers/dma/mv_xor_v2.c 	spin_lock_bh(&xor_dev->lock);
xor_dev           526 drivers/dma/mv_xor_v2.c 	mv_xor_v2_add_desc_to_desq(xor_dev, xor_dev->npendings);
xor_dev           527 drivers/dma/mv_xor_v2.c 	xor_dev->npendings = 0;
xor_dev           529 drivers/dma/mv_xor_v2.c 	spin_unlock_bh(&xor_dev->lock);
xor_dev           533 drivers/dma/mv_xor_v2.c int mv_xor_v2_get_pending_params(struct mv_xor_v2_device *xor_dev,
xor_dev           538 drivers/dma/mv_xor_v2.c 	reg = readl(xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_DONE_OFF);
xor_dev           554 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev = (struct mv_xor_v2_device *) data;
xor_dev           558 drivers/dma/mv_xor_v2.c 	dev_dbg(xor_dev->dmadev.dev, "%s %d\n", __func__, __LINE__);
xor_dev           561 drivers/dma/mv_xor_v2.c 	num_of_pending = mv_xor_v2_get_pending_params(xor_dev, &pending_ptr);
xor_dev           566 drivers/dma/mv_xor_v2.c 			xor_dev->hw_desq_virt + pending_ptr;
xor_dev           570 drivers/dma/mv_xor_v2.c 			&xor_dev->sw_desq[next_pending_hw_desc->desc_id];
xor_dev           589 drivers/dma/mv_xor_v2.c 		spin_lock_bh(&xor_dev->lock);
xor_dev           593 drivers/dma/mv_xor_v2.c 			 &xor_dev->free_sw_desc);
xor_dev           596 drivers/dma/mv_xor_v2.c 		spin_unlock_bh(&xor_dev->lock);
xor_dev           606 drivers/dma/mv_xor_v2.c 		mv_xor_v2_free_desc_from_desq(xor_dev, num_of_pending);
xor_dev           615 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev = dev_get_drvdata(desc->dev);
xor_dev           618 drivers/dma/mv_xor_v2.c 	       xor_dev->dma_base + MV_XOR_V2_DMA_IMSG_BALR_OFF);
xor_dev           620 drivers/dma/mv_xor_v2.c 	       xor_dev->dma_base + MV_XOR_V2_DMA_IMSG_BAHR_OFF);
xor_dev           622 drivers/dma/mv_xor_v2.c 	       xor_dev->dma_base + MV_XOR_V2_DMA_IMSG_CDAT_OFF);
xor_dev           625 drivers/dma/mv_xor_v2.c static int mv_xor_v2_descq_init(struct mv_xor_v2_device *xor_dev)
xor_dev           631 drivers/dma/mv_xor_v2.c 	       xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_SIZE_OFF);
xor_dev           634 drivers/dma/mv_xor_v2.c 	writel(lower_32_bits(xor_dev->hw_desq),
xor_dev           635 drivers/dma/mv_xor_v2.c 	       xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_BALR_OFF);
xor_dev           636 drivers/dma/mv_xor_v2.c 	writel(upper_32_bits(xor_dev->hw_desq),
xor_dev           637 drivers/dma/mv_xor_v2.c 	       xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_BAHR_OFF);
xor_dev           648 drivers/dma/mv_xor_v2.c 	reg = readl(xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_ARATTR_OFF);
xor_dev           652 drivers/dma/mv_xor_v2.c 	writel(reg, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_ARATTR_OFF);
xor_dev           654 drivers/dma/mv_xor_v2.c 	reg = readl(xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_AWATTR_OFF);
xor_dev           658 drivers/dma/mv_xor_v2.c 	writel(reg, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_AWATTR_OFF);
xor_dev           675 drivers/dma/mv_xor_v2.c 	writel(reg, xor_dev->glob_base + MV_XOR_V2_GLOB_BW_CTRL);
xor_dev           678 drivers/dma/mv_xor_v2.c 	reg = readl(xor_dev->glob_base + MV_XOR_V2_GLOB_PAUSE);
xor_dev           680 drivers/dma/mv_xor_v2.c 	writel(reg, xor_dev->glob_base + MV_XOR_V2_GLOB_PAUSE);
xor_dev           683 drivers/dma/mv_xor_v2.c 	writel(0, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_STOP_OFF);
xor_dev           690 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev = platform_get_drvdata(dev);
xor_dev           693 drivers/dma/mv_xor_v2.c 	writel(0x1, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_STOP_OFF);
xor_dev           700 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev = platform_get_drvdata(dev);
xor_dev           702 drivers/dma/mv_xor_v2.c 	mv_xor_v2_set_desc_size(xor_dev);
xor_dev           703 drivers/dma/mv_xor_v2.c 	mv_xor_v2_enable_imsg_thrd(xor_dev);
xor_dev           704 drivers/dma/mv_xor_v2.c 	mv_xor_v2_descq_init(xor_dev);
xor_dev           711 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev;
xor_dev           721 drivers/dma/mv_xor_v2.c 	xor_dev = devm_kzalloc(&pdev->dev, sizeof(*xor_dev), GFP_KERNEL);
xor_dev           722 drivers/dma/mv_xor_v2.c 	if (!xor_dev)
xor_dev           726 drivers/dma/mv_xor_v2.c 	xor_dev->dma_base = devm_ioremap_resource(&pdev->dev, res);
xor_dev           727 drivers/dma/mv_xor_v2.c 	if (IS_ERR(xor_dev->dma_base))
xor_dev           728 drivers/dma/mv_xor_v2.c 		return PTR_ERR(xor_dev->dma_base);
xor_dev           731 drivers/dma/mv_xor_v2.c 	xor_dev->glob_base = devm_ioremap_resource(&pdev->dev, res);
xor_dev           732 drivers/dma/mv_xor_v2.c 	if (IS_ERR(xor_dev->glob_base))
xor_dev           733 drivers/dma/mv_xor_v2.c 		return PTR_ERR(xor_dev->glob_base);
xor_dev           735 drivers/dma/mv_xor_v2.c 	platform_set_drvdata(pdev, xor_dev);
xor_dev           741 drivers/dma/mv_xor_v2.c 	xor_dev->reg_clk = devm_clk_get(&pdev->dev, "reg");
xor_dev           742 drivers/dma/mv_xor_v2.c 	if (PTR_ERR(xor_dev->reg_clk) != -ENOENT) {
xor_dev           743 drivers/dma/mv_xor_v2.c 		if (!IS_ERR(xor_dev->reg_clk)) {
xor_dev           744 drivers/dma/mv_xor_v2.c 			ret = clk_prepare_enable(xor_dev->reg_clk);
xor_dev           748 drivers/dma/mv_xor_v2.c 			return PTR_ERR(xor_dev->reg_clk);
xor_dev           752 drivers/dma/mv_xor_v2.c 	xor_dev->clk = devm_clk_get(&pdev->dev, NULL);
xor_dev           753 drivers/dma/mv_xor_v2.c 	if (IS_ERR(xor_dev->clk) && PTR_ERR(xor_dev->clk) == -EPROBE_DEFER) {
xor_dev           757 drivers/dma/mv_xor_v2.c 	if (!IS_ERR(xor_dev->clk)) {
xor_dev           758 drivers/dma/mv_xor_v2.c 		ret = clk_prepare_enable(xor_dev->clk);
xor_dev           771 drivers/dma/mv_xor_v2.c 	xor_dev->msi_desc = msi_desc;
xor_dev           775 drivers/dma/mv_xor_v2.c 			       dev_name(&pdev->dev), xor_dev);
xor_dev           779 drivers/dma/mv_xor_v2.c 	tasklet_init(&xor_dev->irq_tasklet, mv_xor_v2_tasklet,
xor_dev           780 drivers/dma/mv_xor_v2.c 		     (unsigned long) xor_dev);
xor_dev           782 drivers/dma/mv_xor_v2.c 	xor_dev->desc_size = mv_xor_v2_set_desc_size(xor_dev);
xor_dev           784 drivers/dma/mv_xor_v2.c 	dma_cookie_init(&xor_dev->dmachan);
xor_dev           791 drivers/dma/mv_xor_v2.c 	xor_dev->hw_desq_virt =
xor_dev           793 drivers/dma/mv_xor_v2.c 				   xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
xor_dev           794 drivers/dma/mv_xor_v2.c 				   &xor_dev->hw_desq, GFP_KERNEL);
xor_dev           795 drivers/dma/mv_xor_v2.c 	if (!xor_dev->hw_desq_virt) {
xor_dev           801 drivers/dma/mv_xor_v2.c 	xor_dev->sw_desq = devm_kcalloc(&pdev->dev,
xor_dev           804 drivers/dma/mv_xor_v2.c 	if (!xor_dev->sw_desq) {
xor_dev           809 drivers/dma/mv_xor_v2.c 	spin_lock_init(&xor_dev->lock);
xor_dev           812 drivers/dma/mv_xor_v2.c 	INIT_LIST_HEAD(&xor_dev->free_sw_desc);
xor_dev           817 drivers/dma/mv_xor_v2.c 			xor_dev->sw_desq + i;
xor_dev           820 drivers/dma/mv_xor_v2.c 					     &xor_dev->dmachan);
xor_dev           825 drivers/dma/mv_xor_v2.c 			 &xor_dev->free_sw_desc);
xor_dev           828 drivers/dma/mv_xor_v2.c 	dma_dev = &xor_dev->dmadev;
xor_dev           849 drivers/dma/mv_xor_v2.c 	xor_dev->dmachan.device = dma_dev;
xor_dev           851 drivers/dma/mv_xor_v2.c 	list_add_tail(&xor_dev->dmachan.device_node,
xor_dev           854 drivers/dma/mv_xor_v2.c 	mv_xor_v2_enable_imsg_thrd(xor_dev);
xor_dev           856 drivers/dma/mv_xor_v2.c 	mv_xor_v2_descq_init(xor_dev);
xor_dev           868 drivers/dma/mv_xor_v2.c 			  xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
xor_dev           869 drivers/dma/mv_xor_v2.c 			  xor_dev->hw_desq_virt, xor_dev->hw_desq);
xor_dev           873 drivers/dma/mv_xor_v2.c 	clk_disable_unprepare(xor_dev->clk);
xor_dev           875 drivers/dma/mv_xor_v2.c 	clk_disable_unprepare(xor_dev->reg_clk);
xor_dev           881 drivers/dma/mv_xor_v2.c 	struct mv_xor_v2_device *xor_dev = platform_get_drvdata(pdev);
xor_dev           883 drivers/dma/mv_xor_v2.c 	dma_async_device_unregister(&xor_dev->dmadev);
xor_dev           886 drivers/dma/mv_xor_v2.c 			  xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
xor_dev           887 drivers/dma/mv_xor_v2.c 			  xor_dev->hw_desq_virt, xor_dev->hw_desq);
xor_dev           889 drivers/dma/mv_xor_v2.c 	devm_free_irq(&pdev->dev, xor_dev->msi_desc->irq, xor_dev);
xor_dev           893 drivers/dma/mv_xor_v2.c 	tasklet_kill(&xor_dev->irq_tasklet);
xor_dev           895 drivers/dma/mv_xor_v2.c 	clk_disable_unprepare(xor_dev->clk);