linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot
@ 2014-07-31 10:12 Peter Ujfalusi
  2014-07-31 10:12 ` [PATCH 2/2] dmaengine: edma: Do not register second device when booted with DT Peter Ujfalusi
  2014-07-31 11:58 ` [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2014-07-31 10:12 UTC (permalink / raw)
  To: nsekhar, joelf, vinod.koul
  Cc: linux-kernel, linux-omap, davinci-linux-open-source, dmaengine

In case of edma_alloc_slot() failure during probe we should return the error
unchanged to make debugging easier.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/edma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 69f1f5250120..2953de0f53f3 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -1048,7 +1048,7 @@ static int edma_probe(struct platform_device *pdev)
 	ecc->dummy_slot = edma_alloc_slot(ecc->ctlr, EDMA_SLOT_ANY);
 	if (ecc->dummy_slot < 0) {
 		dev_err(&pdev->dev, "Can't allocate PaRAM dummy slot\n");
-		return -EIO;
+		return ecc->dummy_slot;
 	}
 
 	dma_cap_zero(ecc->dma_slave.cap_mask);
-- 
2.0.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] dmaengine: edma: Do not register second device when booted with DT
  2014-07-31 10:12 [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot Peter Ujfalusi
@ 2014-07-31 10:12 ` Peter Ujfalusi
  2014-07-31 11:58 ` [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2014-07-31 10:12 UTC (permalink / raw)
  To: nsekhar, joelf, vinod.koul
  Cc: linux-kernel, linux-omap, davinci-linux-open-source, dmaengine

DT boot does not yet support more than one edma device. To avoid issues at
runtime we should not register the second device when the kernel is booted
with DT.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/edma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 2953de0f53f3..d99351361fcb 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/of.h>
 
 #include <linux/platform_data/edma.h>
 
@@ -1133,7 +1134,7 @@ static int edma_init(void)
 		}
 	}
 
-	if (EDMA_CTLRS == 2) {
+	if (!of_have_populated_dt() && EDMA_CTLRS == 2) {
 		pdev1 = platform_device_register_full(&edma_dev_info1);
 		if (IS_ERR(pdev1)) {
 			platform_driver_unregister(&edma_driver);
-- 
2.0.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot
  2014-07-31 10:12 [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot Peter Ujfalusi
  2014-07-31 10:12 ` [PATCH 2/2] dmaengine: edma: Do not register second device when booted with DT Peter Ujfalusi
@ 2014-07-31 11:58 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2014-07-31 11:58 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: nsekhar, joelf, linux-kernel, linux-omap,
	davinci-linux-open-source, dmaengine

On Thu, Jul 31, 2014 at 01:12:37PM +0300, Peter Ujfalusi wrote:
> In case of edma_alloc_slot() failure during probe we should return the error
> unchanged to make debugging easier.

Applied both

Thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-31 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 10:12 [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot Peter Ujfalusi
2014-07-31 10:12 ` [PATCH 2/2] dmaengine: edma: Do not register second device when booted with DT Peter Ujfalusi
2014-07-31 11:58 ` [PATCH 1/2] dmaengine: edma: Do not change the error code returned from edma_alloc_slot Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).