All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Update MUSB CPPI 4.1 driver to correctly manage the DA8xx
@ 2017-08-13 12:04 Alexandre Bailon
       [not found] ` <20170813120423.16371-1-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Alexandre Bailon @ 2017-08-13 12:04 UTC (permalink / raw)
  To: b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, nsekhar-l0cyMroinI0,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Alexandre Bailon

A couple of weeks ago, Sekhar reported a warning issue happening in
CPPI 4.1. The teardown sequence was not correctly programmed.
The caused was a couple of difference between the DSPS and the DA8xx.
These differences are the way to program the autoreq, the teardown and
the DMA mode.
This series intends to fix the teardown and to correctly program
the DMA mode.

This series has been roughly tested.
I have only tried it on the DA580 LCK and the BeagleBone Black.
Only the device mode (msc and ecm) have been tested.

Alexandre Bailon (2):
  usb: musb: musb_cppi41: Fix the address of teardown and autoreq
    registers
  usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx

 drivers/usb/musb/musb_cppi41.c | 63 +++++++++++++++++++++++++++++++++++++-----
 1 file changed, 56 insertions(+), 7 deletions(-)

-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found] ` <20170813120423.16371-1-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
@ 2017-08-13 12:04   ` Alexandre Bailon
       [not found]     ` <20170813120423.16371-2-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  2017-08-13 12:04   ` [PATCH 2/2] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx Alexandre Bailon
  1 sibling, 1 reply; 11+ messages in thread
From: Alexandre Bailon @ 2017-08-13 12:04 UTC (permalink / raw)
  To: b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, nsekhar-l0cyMroinI0,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Alexandre Bailon

The DA8xx and DSPS platforms don't use the same address for few registers.
On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
Configure the address of the register during the init and use them instead
of constants.

Reported-by: nsekhar-l0cyMroinI0@public.gmane.org
Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
---
 drivers/usb/musb/musb_cppi41.c | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
index ba255280a624..dbff0e0a4ff5 100644
--- a/drivers/usb/musb/musb_cppi41.c
+++ b/drivers/usb/musb/musb_cppi41.c
@@ -26,6 +26,9 @@
 
 #define MUSB_DMA_NUM_CHANNELS 15
 
+#define DA8XX_USB_AUTOREQ_REG	0x14
+#define DA8XX_USB_TEARDOWN_REG	0x1c
+
 struct cppi41_dma_controller {
 	struct dma_controller controller;
 	struct cppi41_dma_channel rx_channel[MUSB_DMA_NUM_CHANNELS];
@@ -35,6 +38,9 @@ struct cppi41_dma_controller {
 	u32 rx_mode;
 	u32 tx_mode;
 	u32 auto_req;
+
+	u32 tdown_reg;
+	u32 autoreq_reg;
 };
 
 static void save_rx_toggle(struct cppi41_dma_channel *cppi41_channel)
@@ -364,8 +370,8 @@ static void cppi41_set_autoreq_mode(struct cppi41_dma_channel *cppi41_channel,
 	if (new_mode == old_mode)
 		return;
 	controller->auto_req = new_mode;
-	musb_writel(controller->controller.musb->ctrl_base, USB_CTRL_AUTOREQ,
-		    new_mode);
+	musb_writel(controller->controller.musb->ctrl_base,
+		    controller->autoreq_reg, new_mode);
 }
 
 static bool cppi41_configure_channel(struct dma_channel *channel,
@@ -581,12 +587,13 @@ static int cppi41_dma_channel_abort(struct dma_channel *channel)
 
 	do {
 		if (is_tx)
-			musb_writel(musb->ctrl_base, USB_TDOWN, tdbit);
+			musb_writel(musb->ctrl_base, controller->tdown_reg,
+				    tdbit);
 		ret = dmaengine_terminate_all(cppi41_channel->dc);
 	} while (ret == -EAGAIN);
 
 	if (is_tx) {
-		musb_writel(musb->ctrl_base, USB_TDOWN, tdbit);
+		musb_writel(musb->ctrl_base, controller->tdown_reg, tdbit);
 
 		csr = musb_readw(epio, MUSB_TXCSR);
 		if (csr & MUSB_TXCSR_TXPKTRDY) {
@@ -727,6 +734,14 @@ cppi41_dma_controller_create(struct musb *musb, void __iomem *base)
 	controller->controller.is_compatible = cppi41_is_compatible;
 	controller->controller.musb = musb;
 
+	if (musb->io.quirks & MUSB_DA8XX) {
+		controller->tdown_reg = DA8XX_USB_TEARDOWN_REG;
+		controller->autoreq_reg = DA8XX_USB_AUTOREQ_REG;
+	} else {
+		controller->tdown_reg = USB_TDOWN;
+		controller->autoreq_reg = USB_CTRL_AUTOREQ;
+	}
+
 	ret = cppi41_dma_controller_start(controller);
 	if (ret)
 		goto plat_get_fail;
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/2] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx
       [not found] ` <20170813120423.16371-1-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  2017-08-13 12:04   ` [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers Alexandre Bailon
@ 2017-08-13 12:04   ` Alexandre Bailon
       [not found]     ` <20170813120423.16371-3-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  1 sibling, 1 reply; 11+ messages in thread
From: Alexandre Bailon @ 2017-08-13 12:04 UTC (permalink / raw)
  To: b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, nsekhar-l0cyMroinI0,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Alexandre Bailon

The way to configure the DMA mode on DA8xx is different from DSPS.
Add a new function to configure DMA mode on DA8xx and use a callback
to call the right function based on the platform.

Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
---
 drivers/usb/musb/musb_cppi41.c | 40 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 37 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
index dbff0e0a4ff5..7284ec7ecff7 100644
--- a/drivers/usb/musb/musb_cppi41.c
+++ b/drivers/usb/musb/musb_cppi41.c
@@ -26,6 +26,7 @@
 
 #define MUSB_DMA_NUM_CHANNELS 15
 
+#define DA8XX_USB_MODE_REG	0x10
 #define DA8XX_USB_AUTOREQ_REG	0x14
 #define DA8XX_USB_TEARDOWN_REG	0x1c
 
@@ -41,6 +42,9 @@ struct cppi41_dma_controller {
 
 	u32 tdown_reg;
 	u32 autoreq_reg;
+
+	void (*set_dma_mode)(struct cppi41_dma_channel *cppi41_channel,
+			     unsigned int mode);
 };
 
 static void save_rx_toggle(struct cppi41_dma_channel *cppi41_channel)
@@ -355,6 +359,32 @@ static void cppi41_set_dma_mode(struct cppi41_dma_channel *cppi41_channel,
 	}
 }
 
+static void da8xx_set_dma_mode(struct cppi41_dma_channel *cppi41_channel,
+		unsigned int mode)
+{
+	struct cppi41_dma_controller *controller = cppi41_channel->controller;
+	struct musb *musb = controller->controller.musb;
+	unsigned int shift;
+	u32 port;
+	u32 new_mode;
+	u32 old_mode;
+
+	old_mode = controller->tx_mode;
+	port = cppi41_channel->port_num;
+
+	shift = (port - 1) * 4;
+	if (!cppi41_channel->is_tx)
+		shift += 16;
+	new_mode = old_mode & ~(3 << shift);
+	new_mode |= mode << shift;
+
+	if (new_mode == old_mode)
+		return;
+	controller->tx_mode = new_mode;
+	musb_writel(musb->ctrl_base, DA8XX_USB_MODE_REG, new_mode);
+}
+
+
 static void cppi41_set_autoreq_mode(struct cppi41_dma_channel *cppi41_channel,
 		unsigned mode)
 {
@@ -379,6 +409,7 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
 				dma_addr_t dma_addr, u32 len)
 {
 	struct cppi41_dma_channel *cppi41_channel = channel->private_data;
+	struct cppi41_dma_controller *controller = cppi41_channel->controller;
 	struct dma_chan *dc = cppi41_channel->dc;
 	struct dma_async_tx_descriptor *dma_desc;
 	enum dma_transfer_direction direction;
@@ -404,7 +435,7 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
 			musb_writel(musb->ctrl_base,
 				RNDIS_REG(cppi41_channel->port_num), len);
 			/* gen rndis */
-			cppi41_set_dma_mode(cppi41_channel,
+			controller->set_dma_mode(cppi41_channel,
 					EP_MODE_DMA_GEN_RNDIS);
 
 			/* auto req */
@@ -413,14 +444,15 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
 		} else {
 			musb_writel(musb->ctrl_base,
 					RNDIS_REG(cppi41_channel->port_num), 0);
-			cppi41_set_dma_mode(cppi41_channel,
+			controller->set_dma_mode(cppi41_channel,
 					EP_MODE_DMA_TRANSPARENT);
 			cppi41_set_autoreq_mode(cppi41_channel,
 					EP_MODE_AUTOREQ_NONE);
 		}
 	} else {
 		/* fallback mode */
-		cppi41_set_dma_mode(cppi41_channel, EP_MODE_DMA_TRANSPARENT);
+		controller->set_dma_mode(cppi41_channel,
+					EP_MODE_DMA_TRANSPARENT);
 		cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREQ_NONE);
 		len = min_t(u32, packet_sz, len);
 	}
@@ -737,9 +769,11 @@ cppi41_dma_controller_create(struct musb *musb, void __iomem *base)
 	if (musb->io.quirks & MUSB_DA8XX) {
 		controller->tdown_reg = DA8XX_USB_TEARDOWN_REG;
 		controller->autoreq_reg = DA8XX_USB_AUTOREQ_REG;
+		controller->set_dma_mode = da8xx_set_dma_mode;
 	} else {
 		controller->tdown_reg = USB_TDOWN;
 		controller->autoreq_reg = USB_CTRL_AUTOREQ;
+		controller->set_dma_mode = cppi41_set_dma_mode;
 	}
 
 	ret = cppi41_dma_controller_start(controller);
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found]     ` <20170813120423.16371-2-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
@ 2017-08-14 13:31       ` Sekhar Nori
       [not found]         ` <7ee74cb1-19aa-5323-5325-ef9cc3410762-l0cyMroinI0@public.gmane.org>
  2017-08-15 10:12       ` Sergei Shtylyov
  1 sibling, 1 reply; 11+ messages in thread
From: Sekhar Nori @ 2017-08-14 13:31 UTC (permalink / raw)
  To: Alexandre Bailon, b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

Hi,

On Sunday 13 August 2017 05:34 PM, Alexandre Bailon wrote:
> The DA8xx and DSPS platforms don't use the same address for few registers.
> On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
> Configure the address of the register during the init and use them instead
> of constants.
> 
> Reported-by: nsekhar-l0cyMroinI0@public.gmane.org
> Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/usb/musb/musb_cppi41.c | 23 +++++++++++++++++++----
>  1 file changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
> index ba255280a624..dbff0e0a4ff5 100644
> --- a/drivers/usb/musb/musb_cppi41.c
> +++ b/drivers/usb/musb/musb_cppi41.c
> @@ -26,6 +26,9 @@
>  
>  #define MUSB_DMA_NUM_CHANNELS 15
>  
> +#define DA8XX_USB_AUTOREQ_REG	0x14
> +#define DA8XX_USB_TEARDOWN_REG	0x1c

Nice catch. I noticed that the USB_CTRL_TX_MODE and USB_CTRL_RX_MODE are
incorrect for DA8xx too. Perhaps those should be fixed too.

Also, since the original code does not use the _REG suffix for register
offsets, perhaps the new defines should avoid those as well for consistency.

Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found]         ` <7ee74cb1-19aa-5323-5325-ef9cc3410762-l0cyMroinI0@public.gmane.org>
@ 2017-08-14 13:36           ` Sekhar Nori
       [not found]             ` <abce1d79-bc75-2018-2112-d701a8ca69d5-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Sekhar Nori @ 2017-08-14 13:36 UTC (permalink / raw)
  To: Alexandre Bailon, b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On Monday 14 August 2017 07:01 PM, Sekhar Nori wrote:
> Hi,
> 
> On Sunday 13 August 2017 05:34 PM, Alexandre Bailon wrote:
>> The DA8xx and DSPS platforms don't use the same address for few registers.
>> On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
>> Configure the address of the register during the init and use them instead
>> of constants.
>>
>> Reported-by: nsekhar-l0cyMroinI0@public.gmane.org

Reported-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>

>> Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>> ---
>>  drivers/usb/musb/musb_cppi41.c | 23 +++++++++++++++++++----
>>  1 file changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
>> index ba255280a624..dbff0e0a4ff5 100644
>> --- a/drivers/usb/musb/musb_cppi41.c
>> +++ b/drivers/usb/musb/musb_cppi41.c
>> @@ -26,6 +26,9 @@
>>  
>>  #define MUSB_DMA_NUM_CHANNELS 15
>>  
>> +#define DA8XX_USB_AUTOREQ_REG	0x14
>> +#define DA8XX_USB_TEARDOWN_REG	0x1c
> 
> Nice catch. I noticed that the USB_CTRL_TX_MODE and USB_CTRL_RX_MODE are
> incorrect for DA8xx too. Perhaps those should be fixed too.

Ah, just read 2/2 now, and seems like thats exactly what you are
handling there.

Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found]     ` <20170813120423.16371-2-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  2017-08-14 13:31       ` Sekhar Nori
@ 2017-08-15 10:12       ` Sergei Shtylyov
       [not found]         ` <6e5b0e12-d298-b698-bc06-d9c3ae8fb5c3-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
  1 sibling, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2017-08-15 10:12 UTC (permalink / raw)
  To: Alexandre Bailon, b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, nsekhar-l0cyMroinI0,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

Hello!

On 8/13/2017 3:04 PM, Alexandre Bailon wrote:

> The DA8xx and DSPS platforms don't use the same address for few registers.
> On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
> Configure the address of the register during the init and use them instead
> of constants.
> 
> Reported-by: nsekhar-l0cyMroinI0@public.gmane.org
> Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> ---
>   drivers/usb/musb/musb_cppi41.c | 23 +++++++++++++++++++----
>   1 file changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
> index ba255280a624..dbff0e0a4ff5 100644
> --- a/drivers/usb/musb/musb_cppi41.c
> +++ b/drivers/usb/musb/musb_cppi41.c
> @@ -26,6 +26,9 @@
>   
>   #define MUSB_DMA_NUM_CHANNELS 15
>   
> +#define DA8XX_USB_AUTOREQ_REG	0x14
> +#define DA8XX_USB_TEARDOWN_REG	0x1c

    Why these _REG suffixes suddenly?

[...]

    Other than that looks sane. Need my ACK?

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/2] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx
       [not found]     ` <20170813120423.16371-3-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
@ 2017-08-15 10:23       ` Sergei Shtylyov
  0 siblings, 0 replies; 11+ messages in thread
From: Sergei Shtylyov @ 2017-08-15 10:23 UTC (permalink / raw)
  To: Alexandre Bailon, b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, nsekhar-l0cyMroinI0,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On 8/13/2017 3:04 PM, Alexandre Bailon wrote:

> The way to configure the DMA mode on DA8xx is different from DSPS.
> Add a new function to configure DMA mode on DA8xx and use a callback
> to call the right function based on the platform.
> 
> Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> ---
>   drivers/usb/musb/musb_cppi41.c | 40 +++++++++++++++++++++++++++++++++++++---
>   1 file changed, 37 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
> index dbff0e0a4ff5..7284ec7ecff7 100644
> --- a/drivers/usb/musb/musb_cppi41.c
> +++ b/drivers/usb/musb/musb_cppi41.c
> @@ -26,6 +26,7 @@
>   
>   #define MUSB_DMA_NUM_CHANNELS 15

    Perhaps this needs parametrizing too? DA8xx only has 4 channels IIRC...


> +#define DA8XX_USB_MODE_REG	0x10

    Drop this _REG suffix please.

>   #define DA8XX_USB_AUTOREQ_REG	0x14
>   #define DA8XX_USB_TEARDOWN_REG	0x1c
>   
[...]
> @@ -413,14 +444,15 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
>   		} else {
>   			musb_writel(musb->ctrl_base,
>   					RNDIS_REG(cppi41_channel->port_num), 0);
> -			cppi41_set_dma_mode(cppi41_channel,
> +			controller->set_dma_mode(cppi41_channel,
>   					EP_MODE_DMA_TRANSPARENT);
>   			cppi41_set_autoreq_mode(cppi41_channel,
>   					EP_MODE_AUTOREQ_NONE);
>   		}
>   	} else {
>   		/* fallback mode */
> -		cppi41_set_dma_mode(cppi41_channel, EP_MODE_DMA_TRANSPARENT);
> +		controller->set_dma_mode(cppi41_channel,
> +					EP_MODE_DMA_TRANSPARENT);

    Inconsistent indentation -- you used 2 extra tabs above and 3 here.

[...]

MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found]             ` <abce1d79-bc75-2018-2112-d701a8ca69d5-l0cyMroinI0@public.gmane.org>
@ 2017-09-04 13:02               ` Sekhar Nori
       [not found]                 ` <868405c0-0731-7546-509c-8270eb20f30e-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Sekhar Nori @ 2017-09-04 13:02 UTC (permalink / raw)
  To: Alexandre Bailon, b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On Monday 14 August 2017 07:06 PM, Sekhar Nori wrote:
> On Monday 14 August 2017 07:01 PM, Sekhar Nori wrote:
>> Hi,
>>
>> On Sunday 13 August 2017 05:34 PM, Alexandre Bailon wrote:
>>> The DA8xx and DSPS platforms don't use the same address for few registers.
>>> On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
>>> Configure the address of the register during the init and use them instead
>>> of constants.
>>>
>>> Reported-by: nsekhar-l0cyMroinI0@public.gmane.org
> 
> Reported-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>

Tested-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>

Hi Bin,

Do you have any additional comments on this series or are you waiting
for v2 to be posted?

Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found]                 ` <868405c0-0731-7546-509c-8270eb20f30e-l0cyMroinI0@public.gmane.org>
@ 2017-09-07 17:16                   ` Bin Liu
       [not found]                     ` <20170907171602.GB21905-zlS79ln5qqxp6PWD+TyudpdHMjK6IpyN@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Bin Liu @ 2017-09-07 17:16 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Alexandre Bailon, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On Mon, Sep 04, 2017 at 06:32:11PM +0530, Sekhar Nori wrote:
> On Monday 14 August 2017 07:06 PM, Sekhar Nori wrote:
> > On Monday 14 August 2017 07:01 PM, Sekhar Nori wrote:
> >> Hi,
> >>
> >> On Sunday 13 August 2017 05:34 PM, Alexandre Bailon wrote:
> >>> The DA8xx and DSPS platforms don't use the same address for few registers.
> >>> On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
> >>> Configure the address of the register during the init and use them instead
> >>> of constants.
> >>>
> >>> Reported-by: nsekhar-l0cyMroinI0@public.gmane.org
> > 
> > Reported-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
> 
> Tested-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
> 
> Hi Bin,
> 
> Do you have any additional comments on this series or are you waiting
> for v2 to be posted?

I don't have other comments, just am waiting for v2.

Regards,
-Bin.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found]                     ` <20170907171602.GB21905-zlS79ln5qqxp6PWD+TyudpdHMjK6IpyN@public.gmane.org>
@ 2017-09-12  6:42                       ` Alexandre Bailon
  0 siblings, 0 replies; 11+ messages in thread
From: Alexandre Bailon @ 2017-09-12  6:42 UTC (permalink / raw)
  To: Bin Liu, Sekhar Nori, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

Hi Bin, Sekhar
On 09/07/2017 07:16 PM, Bin Liu wrote:
> On Mon, Sep 04, 2017 at 06:32:11PM +0530, Sekhar Nori wrote:
>> On Monday 14 August 2017 07:06 PM, Sekhar Nori wrote:
>>> On Monday 14 August 2017 07:01 PM, Sekhar Nori wrote:
>>>> Hi,
>>>>
>>>> On Sunday 13 August 2017 05:34 PM, Alexandre Bailon wrote:
>>>>> The DA8xx and DSPS platforms don't use the same address for few registers.
>>>>> On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
>>>>> Configure the address of the register during the init and use them instead
>>>>> of constants.
>>>>>
>>>>> Reported-by: nsekhar-l0cyMroinI0@public.gmane.org
>>> Reported-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
>> Tested-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
>>
>> Hi Bin,
>>
>> Do you have any additional comments on this series or are you waiting
>> for v2 to be posted?
> I don't have other comments, just am waiting for v2.
My apologize. I was in vacation. I will send the v2 soon.

Best Regards,
Alexandre
>
> Regards,
> -Bin.
>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
       [not found]         ` <6e5b0e12-d298-b698-bc06-d9c3ae8fb5c3-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
@ 2017-09-12  6:49           ` Alexandre Bailon
  0 siblings, 0 replies; 11+ messages in thread
From: Alexandre Bailon @ 2017-09-12  6:49 UTC (permalink / raw)
  To: Sergei Shtylyov, b-liu-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, nsekhar-l0cyMroinI0,
	ptitiano-rdvid1DuHRBWk0Htik3J/w,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On 08/15/2017 12:12 PM, Sergei Shtylyov wrote:
> Hello!
>
> On 8/13/2017 3:04 PM, Alexandre Bailon wrote:
>
>> The DA8xx and DSPS platforms don't use the same address for few
>> registers.
>> On Da8xx, this is causing some issues (e.g. teardown that doesn't work).
>> Configure the address of the register during the init and use them
>> instead
>> of constants.
>>
>> Reported-by: nsekhar-l0cyMroinI0@public.gmane.org
>> Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>> ---
>>   drivers/usb/musb/musb_cppi41.c | 23 +++++++++++++++++++----
>>   1 file changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/musb/musb_cppi41.c
>> b/drivers/usb/musb/musb_cppi41.c
>> index ba255280a624..dbff0e0a4ff5 100644
>> --- a/drivers/usb/musb/musb_cppi41.c
>> +++ b/drivers/usb/musb/musb_cppi41.c
>> @@ -26,6 +26,9 @@
>>     #define MUSB_DMA_NUM_CHANNELS 15
>>   +#define DA8XX_USB_AUTOREQ_REG    0x14
>> +#define DA8XX_USB_TEARDOWN_REG    0x1c
>
>    Why these _REG suffixes suddenly?
I took these defines in da8xx.c.
Actually, I think I should make a third patch to remove them from
da8xx.c because they are not even used.
>
> [...]
>
>    Other than that looks sane. Need my ACK?
I don't know if that is needed but I guess it would be appreciated.

Best Regards,
Alexandre
>
> WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-09-12  6:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-13 12:04 [PATCH 0/2] Update MUSB CPPI 4.1 driver to correctly manage the DA8xx Alexandre Bailon
     [not found] ` <20170813120423.16371-1-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-08-13 12:04   ` [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers Alexandre Bailon
     [not found]     ` <20170813120423.16371-2-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-08-14 13:31       ` Sekhar Nori
     [not found]         ` <7ee74cb1-19aa-5323-5325-ef9cc3410762-l0cyMroinI0@public.gmane.org>
2017-08-14 13:36           ` Sekhar Nori
     [not found]             ` <abce1d79-bc75-2018-2112-d701a8ca69d5-l0cyMroinI0@public.gmane.org>
2017-09-04 13:02               ` Sekhar Nori
     [not found]                 ` <868405c0-0731-7546-509c-8270eb20f30e-l0cyMroinI0@public.gmane.org>
2017-09-07 17:16                   ` Bin Liu
     [not found]                     ` <20170907171602.GB21905-zlS79ln5qqxp6PWD+TyudpdHMjK6IpyN@public.gmane.org>
2017-09-12  6:42                       ` Alexandre Bailon
2017-08-15 10:12       ` Sergei Shtylyov
     [not found]         ` <6e5b0e12-d298-b698-bc06-d9c3ae8fb5c3-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2017-09-12  6:49           ` Alexandre Bailon
2017-08-13 12:04   ` [PATCH 2/2] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx Alexandre Bailon
     [not found]     ` <20170813120423.16371-3-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-08-15 10:23       ` Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.