Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1502718 > unrolled thread
| Started by | Robert Jarzmik <robert.jarzmik@free.fr> |
|---|---|
| First post | 2016-10-18 08:50 +0200 |
| Last post | 2016-10-18 16:40 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] Revert "dmaengine: pxa_dma: add support for legacy transition" Robert Jarzmik <robert.jarzmik@free.fr> - 2016-10-18 08:50 +0200
Re: [PATCH] Revert "dmaengine: pxa_dma: add support for legacy transition" Arnd Bergmann <arnd@arndb.de> - 2016-10-18 11:00 +0200
Re: [PATCH] Revert "dmaengine: pxa_dma: add support for legacy transition" Robert Jarzmik <robert.jarzmik@free.fr> - 2016-10-20 19:40 +0200
Re: [PATCH] Revert "dmaengine: pxa_dma: add support for legacy transition" Vinod Koul <vinod.koul@intel.com> - 2016-10-18 16:40 +0200
| From | Robert Jarzmik <robert.jarzmik@free.fr> |
|---|---|
| Date | 2016-10-18 08:50 +0200 |
| Subject | [PATCH] Revert "dmaengine: pxa_dma: add support for legacy transition" |
| Message-ID | <stwnL-6yc-3@gated-at.bofh.it> |
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>
---
drivers/dma/pxa_dma.c | 28 ----------------------------
1 file changed, 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) {}
static inline void pxad_cleanup_debugfs(struct pxad_device *pdev) {}
#endif
-/*
- * In the transition phase where legacy pxa handling is done at the same time as
- * mmp_dma, the DMA physical channel split between the 2 DMA providers is done
- * through legacy_reserved. Legacy code reserves DMA channels by settings
- * corresponding bits in legacy_reserved.
- */
-static u32 legacy_reserved;
-static u32 legacy_unavailable;
-
static struct pxad_phy *lookup_phy(struct pxad_chan *pchan)
{
int prio, i;
@@ -442,14 +433,10 @@ static struct pxad_phy *lookup_phy(struct pxad_chan *pchan)
for (i = 0; i < pdev->nr_chans; i++) {
if (prio != (i & 0xf) >> 2)
continue;
- if ((i < 32) && (legacy_reserved & BIT(i)))
- continue;
phy = &pdev->phys[i];
if (!phy->vchan) {
phy->vchan = pchan;
found = phy;
- if (i < 32)
- legacy_unavailable |= BIT(i);
goto out_unlock;
}
}
@@ -469,7 +456,6 @@ static void pxad_free_phy(struct pxad_chan *chan)
struct pxad_device *pdev = to_pxad_dev(chan->vc.chan.device);
unsigned long flags;
u32 reg;
- int i;
dev_dbg(&chan->vc.chan.dev->device,
"%s(): freeing\n", __func__);
@@ -483,9 +469,6 @@ static void pxad_free_phy(struct pxad_chan *chan)
}
spin_lock_irqsave(&pdev->phy_lock, flags);
- for (i = 0; i < 32; i++)
- if (chan->phy == &pdev->phys[i])
- legacy_unavailable &= ~BIT(i);
chan->phy->vchan = NULL;
chan->phy = NULL;
spin_unlock_irqrestore(&pdev->phy_lock, flags);
@@ -739,8 +722,6 @@ static irqreturn_t pxad_int_handler(int irq, void *dev_id)
i = __ffs(dint);
dint &= (dint - 1);
phy = &pdev->phys[i];
- if ((i < 32) && (legacy_reserved & BIT(i)))
- continue;
if (pxad_chan_handler(irq, phy) == IRQ_HANDLED)
ret = IRQ_HANDLED;
}
@@ -1522,15 +1503,6 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param)
}
EXPORT_SYMBOL_GPL(pxad_filter_fn);
-int pxad_toggle_reserved_channel(int legacy_channel)
-{
- if (legacy_unavailable & (BIT(legacy_channel)))
- return -EBUSY;
- legacy_reserved ^= BIT(legacy_channel);
- return 0;
-}
-EXPORT_SYMBOL_GPL(pxad_toggle_reserved_channel);
-
module_platform_driver(pxad_driver);
MODULE_DESCRIPTION("Marvell PXA Peripheral DMA Driver");
--
2.1.4
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-10-18 11:00 +0200 |
| Message-ID | <stypz-7Kb-3@gated-at.bofh.it> |
| In reply to | #1502718 |
On Tuesday, October 18, 2016 8:46:32 AM CEST Robert Jarzmik wrote: > 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> Nice! That reminds me, do you have plans to work on the conversion away from IORESOURCE_DMA and pxad_filter_fn towards the dma_slave_map interface? I see that all pxa drivers already use dma_request_slave_channel_compat, so this should be fairly straightforward to do, changing only the driver and the arch/arm/mach-pxa/devices.c file. Acked-by: Arnd Bergmann <arnd@arndb.de>
[toc] | [prev] | [next] | [standalone]
| From | Robert Jarzmik <robert.jarzmik@free.fr> |
|---|---|
| Date | 2016-10-20 19:40 +0200 |
| Message-ID | <suptU-2bV-33@gated-at.bofh.it> |
| In reply to | #1502803 |
Arnd Bergmann <arnd@arndb.de> writes: > On Tuesday, October 18, 2016 8:46:32 AM CEST Robert Jarzmik wrote: >> 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> > > Nice! > > That reminds me, do you have plans to work on the conversion away from > IORESOURCE_DMA and pxad_filter_fn towards the dma_slave_map interface? > > I see that all pxa drivers already use dma_request_slave_channel_compat, > so this should be fairly straightforward to do, changing only the > driver and the arch/arm/mach-pxa/devices.c file. I didn't so far, as I wasn't aware of this interface, but I'll gladly put that on my todo list. Cheers. -- Robert
[toc] | [prev] | [next] | [standalone]
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2016-10-18 16:40 +0200 |
| Subject | Re: [PATCH] Revert "dmaengine: pxa_dma: add support for legacy transition" |
| Message-ID | <stDID-2X6-97@gated-at.bofh.it> |
| In reply to | #1502718 |
On Tue, Oct 18, 2016 at 08:46:32AM +0200, Robert Jarzmik wrote: > 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. Applied, thanks -- ~Vinod
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web