mmp_tdma.c (eeca9fad52fc4bfdf42c38bfcf383e932eb3e9d6) | mmp_tdma.c (ec5b103ecfde929004b691f29183255aeeadecd5) |
---|---|
1/* 2 * Driver For Marvell Two-channel DMA Engine 3 * 4 * Copyright: Marvell International Ltd. 5 * 6 * The code contained herein is licensed under the GNU General Public 7 * License. You may obtain a copy of the GNU General Public License 8 * Version 2 or later at the following locations: --- 446 unchanged lines hidden (view full) --- 455 return ret; 456} 457 458static enum dma_status mmp_tdma_tx_status(struct dma_chan *chan, 459 dma_cookie_t cookie, struct dma_tx_state *txstate) 460{ 461 struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); 462 | 1/* 2 * Driver For Marvell Two-channel DMA Engine 3 * 4 * Copyright: Marvell International Ltd. 5 * 6 * The code contained herein is licensed under the GNU General Public 7 * License. You may obtain a copy of the GNU General Public License 8 * Version 2 or later at the following locations: --- 446 unchanged lines hidden (view full) --- 455 return ret; 456} 457 458static enum dma_status mmp_tdma_tx_status(struct dma_chan *chan, 459 dma_cookie_t cookie, struct dma_tx_state *txstate) 460{ 461 struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); 462 |
463 dma_set_residue(txstate, tdmac->buf_len - tdmac->pos); | 463 dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie, 464 tdmac->buf_len - tdmac->pos); |
464 465 return tdmac->status; 466} 467 468static void mmp_tdma_issue_pending(struct dma_chan *chan) 469{ 470 struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); 471 --- 72 unchanged lines hidden (view full) --- 544 tdev->dev = &pdev->dev; 545 546 for (i = 0; i < chan_num; i++) { 547 if (platform_get_irq(pdev, i) > 0) 548 irq_num++; 549 } 550 551 iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 465 466 return tdmac->status; 467} 468 469static void mmp_tdma_issue_pending(struct dma_chan *chan) 470{ 471 struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); 472 --- 72 unchanged lines hidden (view full) --- 545 tdev->dev = &pdev->dev; 546 547 for (i = 0; i < chan_num; i++) { 548 if (platform_get_irq(pdev, i) > 0) 549 irq_num++; 550 } 551 552 iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
552 if (!iores) 553 return -EINVAL; 554 | |
555 tdev->base = devm_ioremap_resource(&pdev->dev, iores); 556 if (IS_ERR(tdev->base)) 557 return PTR_ERR(tdev->base); 558 559 INIT_LIST_HEAD(&tdev->device.channels); 560 561 if (irq_num != chan_num) { 562 irq = platform_get_irq(pdev, 0); --- 64 unchanged lines hidden --- | 553 tdev->base = devm_ioremap_resource(&pdev->dev, iores); 554 if (IS_ERR(tdev->base)) 555 return PTR_ERR(tdev->base); 556 557 INIT_LIST_HEAD(&tdev->device.channels); 558 559 if (irq_num != chan_num) { 560 irq = platform_get_irq(pdev, 0); --- 64 unchanged lines hidden --- |