aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2016-10-18 02:46:32 -0400
committerVinod Koul <vinod.koul@intel.com>2016-10-18 10:44:32 -0400
commit556195f492a15f27f2389acf6e99ae8e5a1bf3d9 (patch)
treeed13251b123e71be1fa6cd9b8f6e7fa7c8607dcb
parent1001354ca34179f3db924eb66672442a173147dc (diff)
Revert "dmaengine: pxa_dma: add support for legacy transition"
This reverts commit c91134d9194478144ba579ca6efeddf628055650. The conversion of the pxa architecture is now finished for all drivers, so this functions has fullfilled its purpose and can now be removed. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/pxa_dma.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
index 3f56f9ca4482..b53fb618bbf6 100644
--- a/drivers/dma/pxa_dma.c
+++ b/drivers/dma/pxa_dma.c
@@ -413,15 +413,6 @@ static inline void pxad_init_debugfs(struct pxad_device *pdev) {}
413static inline void pxad_cleanup_debugfs(struct pxad_device *pdev) {} 413static inline void pxad_cleanup_debugfs(struct pxad_device *pdev) {}
414#endif 414#endif
415 415
416/*
417 * In the transition phase where legacy pxa handling is done at the same time as
418 * mmp_dma, the DMA physical channel split between the 2 DMA providers is done
419 * through legacy_reserved. Legacy code reserves DMA channels by settings
420 * corresponding bits in legacy_reserved.
421 */
422static u32 legacy_reserved;
423static u32 legacy_unavailable;
424
425static struct pxad_phy *lookup_phy(struct pxad_chan *pchan) 416static struct pxad_phy *lookup_phy(struct pxad_chan *pchan)
426{ 417{
427 int prio, i; 418 int prio, i;
@@ -442,14 +433,10 @@ static struct pxad_phy *lookup_phy(struct pxad_chan *pchan)
442 for (i = 0; i < pdev->nr_chans; i++) { 433 for (i = 0; i < pdev->nr_chans; i++) {
443 if (prio != (i & 0xf) >> 2) 434 if (prio != (i & 0xf) >> 2)
444 continue; 435 continue;
445 if ((i < 32) && (legacy_reserved & BIT(i)))
446 continue;
447 phy = &pdev->phys[i]; 436 phy = &pdev->phys[i];
448 if (!phy->vchan) { 437 if (!phy->vchan) {
449 phy->vchan = pchan; 438 phy->vchan = pchan;
450 found = phy; 439 found = phy;
451 if (i < 32)
452 legacy_unavailable |= BIT(i);
453 goto out_unlock; 440 goto out_unlock;
454 } 441 }
455 } 442 }
@@ -469,7 +456,6 @@ static void pxad_free_phy(struct pxad_chan *chan)
469 struct pxad_device *pdev = to_pxad_dev(chan->vc.chan.device); 456 struct pxad_device *pdev = to_pxad_dev(chan->vc.chan.device);
470 unsigned long flags; 457 unsigned long flags;
471 u32 reg; 458 u32 reg;
472 int i;
473 459
474 dev_dbg(&chan->vc.chan.dev->device, 460 dev_dbg(&chan->vc.chan.dev->device,
475 "%s(): freeing\n", __func__); 461 "%s(): freeing\n", __func__);
@@ -483,9 +469,6 @@ static void pxad_free_phy(struct pxad_chan *chan)
483 } 469 }
484 470
485 spin_lock_irqsave(&pdev->phy_lock, flags); 471 spin_lock_irqsave(&pdev->phy_lock, flags);
486 for (i = 0; i < 32; i++)
487 if (chan->phy == &pdev->phys[i])
488 legacy_unavailable &= ~BIT(i);
489 chan->phy->vchan = NULL; 472 chan->phy->vchan = NULL;
490 chan->phy = NULL; 473 chan->phy = NULL;
491 spin_unlock_irqrestore(&pdev->phy_lock, flags); 474 spin_unlock_irqrestore(&pdev->phy_lock, flags);
@@ -739,8 +722,6 @@ static irqreturn_t pxad_int_handler(int irq, void *dev_id)
739 i = __ffs(dint); 722 i = __ffs(dint);
740 dint &= (dint - 1); 723 dint &= (dint - 1);
741 phy = &pdev->phys[i]; 724 phy = &pdev->phys[i];
742 if ((i < 32) && (legacy_reserved & BIT(i)))
743 continue;
744 if (pxad_chan_handler(irq, phy) == IRQ_HANDLED) 725 if (pxad_chan_handler(irq, phy) == IRQ_HANDLED)
745 ret = IRQ_HANDLED; 726 ret = IRQ_HANDLED;
746 } 727 }
@@ -1522,15 +1503,6 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param)
1522} 1503}
1523EXPORT_SYMBOL_GPL(pxad_filter_fn); 1504EXPORT_SYMBOL_GPL(pxad_filter_fn);
1524 1505
1525int pxad_toggle_reserved_channel(int legacy_channel)
1526{
1527 if (legacy_unavailable & (BIT(legacy_channel)))
1528 return -EBUSY;
1529 legacy_reserved ^= BIT(legacy_channel);
1530 return 0;
1531}
1532EXPORT_SYMBOL_GPL(pxad_toggle_reserved_channel);
1533
1534module_platform_driver(pxad_driver); 1506module_platform_driver(pxad_driver);
1535 1507
1536MODULE_DESCRIPTION("Marvell PXA Peripheral DMA Driver"); 1508MODULE_DESCRIPTION("Marvell PXA Peripheral DMA Driver");