[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160503000555.695732270@linuxfoundation.org>
Date: Mon, 2 May 2016 17:10:32 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Robert Jarzmik <robert.jarzmik@...e.fr>,
Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
Brian Norris <computersforpeace@...il.com>
Subject: [PATCH 4.5 033/200] mtd: nand: pxa3xx_nand: fix dmaengine initialization
4.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robert Jarzmik <robert.jarzmik@...e.fr>
commit 9097103f06332d099c5ab06d1e7f22f4bcaca6e2 upstream.
When the driver is initialized in a pure device-tree platform, the
driver's probe fails allocating the dma channel :
[ 525.624435] pxa3xx-nand 43100000.nand: no resource defined for data DMA
[ 525.632088] pxa3xx-nand 43100000.nand: alloc nand resource failed
The reason is that the DMA IO resource is not acquired through platform
resources but by OF bindings.
Fix this by ensuring that DMA IO resources are only queried in the non
device-tree case.
Fixes: 8f5ba31aa565 ("mtd: nand: pxa3xx-nand: switch to dmaengine")
Signed-off-by: Robert Jarzmik <robert.jarzmik@...e.fr>
Acked-by: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
Signed-off-by: Brian Norris <computersforpeace@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/mtd/nand/pxa3xx_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1738,7 +1738,7 @@ static int alloc_nand_resource(struct pl
if (ret < 0)
return ret;
- if (use_dma) {
+ if (!np && use_dma) {
r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
if (r == NULL) {
dev_err(&pdev->dev,
Powered by blists - more mailing lists