diff mbox

usb: musb: cppi41: allow it to work again

Message ID 1443820525-12118-1-git-send-email-ezequiel@vanguardiasur.com.ar
State New
Headers show

Commit Message

Ezequiel Garcia Oct. 2, 2015, 9:15 p.m. UTC
From: Felipe Balbi <balbi@ti.com>

since commit 33c300cb90a6 ("usb: musb: dsps:
don't fake of_node to musb core") we have been
preventing CPPI 4.1 from probing due to NULL
of_node. We can't revert said commit otherwise
a different regression would show up, so the fix
is to look for the parent device's (glue layer's)
of_node instead, since that's the thing which
is actually described in DTS.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
Upstream commit ID is b0a688ddcc50.

As noted by the original commit log, this patch fixes
a USB regression introduced by commit 33c300cb90a6
("usb: musb: dsps: don't fake of_node to musb core").

Without this fix, musb works only in PIO mode, as the
CPPI41 DMA controller is not created.

Should be applied to v4.1.x and v4.2.x.

Thanks!
Ezequiel

 drivers/usb/musb/musb_cppi41.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Greg KH Oct. 17, 2015, 11:18 p.m. UTC | #1
On Fri, Oct 02, 2015 at 06:15:25PM -0300, Ezequiel Garcia wrote:
> From: Felipe Balbi <balbi@ti.com>
> 
> since commit 33c300cb90a6 ("usb: musb: dsps:
> don't fake of_node to musb core") we have been
> preventing CPPI 4.1 from probing due to NULL
> of_node. We can't revert said commit otherwise
> a different regression would show up, so the fix
> is to look for the parent device's (glue layer's)
> of_node instead, since that's the thing which
> is actually described in DTS.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> Upstream commit ID is b0a688ddcc50.
> 
> As noted by the original commit log, this patch fixes
> a USB regression introduced by commit 33c300cb90a6
> ("usb: musb: dsps: don't fake of_node to musb core").
> 
> Without this fix, musb works only in PIO mode, as the
> CPPI41 DMA controller is not created.
> 
> Should be applied to v4.1.x and v4.2.x.

Now applied, thanks.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
index 8bd8c5e26921..d5a140745640 100644
--- a/drivers/usb/musb/musb_cppi41.c
+++ b/drivers/usb/musb/musb_cppi41.c
@@ -614,7 +614,7 @@  static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller)
 {
 	struct musb *musb = controller->musb;
 	struct device *dev = musb->controller;
-	struct device_node *np = dev->of_node;
+	struct device_node *np = dev->parent->of_node;
 	struct cppi41_dma_channel *cppi41_channel;
 	int count;
 	int i;
@@ -664,7 +664,7 @@  static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller)
 		musb_dma->status = MUSB_DMA_STATUS_FREE;
 		musb_dma->max_len = SZ_4M;
 
-		dc = dma_request_slave_channel(dev, str);
+		dc = dma_request_slave_channel(dev->parent, str);
 		if (!dc) {
 			dev_err(dev, "Failed to request %s.\n", str);
 			ret = -EPROBE_DEFER;
@@ -694,7 +694,7 @@  struct dma_controller *dma_controller_create(struct musb *musb,
 	struct cppi41_dma_controller *controller;
 	int ret = 0;
 
-	if (!musb->controller->of_node) {
+	if (!musb->controller->parent->of_node) {
 		dev_err(musb->controller, "Need DT for the DMA engine.\n");
 		return NULL;
 	}