Re: [PATCH] USB: ftdi_sio: Added custom PID for CustomWare products

2015-08-03 Thread Matthijs Kooijman
Hi Lars, What I meant is that ...FTDI_C. should come before ...FTDI_S and not after, but I've had a look at the whole ftdi_sio.c source now and it looks horrible. I think it doesn't really matter where you put your additions, do as others has done and put them at a random position..

[PATCH] USB: ftdi_sio: Added custom PID for CustomWare products

2015-08-02 Thread Matthijs Kooijman
CustomWare uses the FTDI VID with custom PIDs for their ShipModul MiniPlex products. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/usb/serial/ftdi_sio.c | 4 drivers/usb/serial/ftdi_sio_ids.h | 8 2 files changed, 12 insertions(+) diff --git a/drivers/usb

Re: [PATCH] USB: ftdi_sio: Added custom PID for CustomWare products

2015-08-02 Thread Matthijs Kooijman
Hi Lars, thanks for your feedback. +{ USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) }, +{ USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) }, +{ USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2WI_PID) }, +{ USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX3_PID) },

Re: [RFC] Does PHY UTMI data width belong to DWC2 or PHY binding?

2013-10-22 Thread Matthijs Kooijman
Hi Kishon, On Mon, Oct 21, 2013 at 02:57:26PM +0530, Kishon Vijay Abraham I wrote: I think it makes sense to keep the data width property in the dwc2 node itself. I mean it describes how the dwc2 IP is configured in that particular SoC (given that it can be either 8 or 16). If I'm reading

Re: [PATCH] staging: dwc2: Make dwc2_hw_params.host_channels large enough

2013-10-03 Thread Matthijs Kooijman
Hi Paul, By the way, it looks like 'num_dev_ep' would have the same problem, I don't think so, since the hardware doesn't do the off-by-one trick there (presumably because having 0 endpoints make sense, but 0 host channels doesn't): hw-num_dev_ep = (hwcfg2 GHWCFG2_NUM_DEV_EP_MASK)

[PATCH] staging: dwc2: Make dwc2_hw_params.host_channels large enough

2013-10-03 Thread Matthijs Kooijman
-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- This is exactly the same patch as before, but with updated tags in the commit message. drivers/staging/dwc2/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/core.h b

Re: [PATCH] staging: dwc2: Make dwc2_hw_params.host_channels large enough

2013-10-02 Thread Matthijs Kooijman
Hey Dinh, Reported-by: Dinh Nguyen dinh.li...@gmail.com Can you please use: Dinh Nguyen dingu...@altera.com Sorry, I just used your sender address, should have checked your patch instead. Paul, if you can ack this patch, I'll resend it with the proper tag and include your acked-by as well.

Re: [PATCHv2] staging: dwc2: Fix code that gets the nummber of host channels

2013-10-01 Thread Matthijs Kooijman
On Tue, Oct 01, 2013 at 10:05:17AM +0300, Dan Carpenter wrote: On Tue, Oct 01, 2013 at 01:21:28AM +, Paul Zimmerman wrote: From: Dan Carpenter [mailto:dan.carpen...@oracle.com] Sent: Monday, September 30, 2013 6:09 PM Yeah. I guess it's fine... I was going to suggest adding the

Re: [PATCHv2] staging: dwc2: Fix code that gets the nummber of host channels

2013-10-01 Thread Matthijs Kooijman
Hi Dinh, Somehow I assumed that was fixed by the hardware, but I see now that you are right. Yes, making the definition larger is better than moving the + 1. This was my original fix to the problem, but I thought that it would be confusing when reading the code. I also thought about the +1

Re: [PATCHv2] staging: dwc2: Fix code that gets the nummber of host channels

2013-10-01 Thread Matthijs Kooijman
Hey Dan, Dinh, [resend]: previous reply didn't include Matthijs He sets his Mail-Followup-To: so that we don't CC him on replies. I assume it's deliberate because he only wants the copy from the mailing list? Exactly, I just set that for whatever mailing list I subscribe to. However,

[PATCH] staging: dwc2: Make dwc2_hw_params.host_channels large enough

2013-10-01 Thread Matthijs Kooijman
-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h index f7ba34b..fab718d 100644 --- a/drivers/staging/dwc2/core.h +++ b/drivers/staging/dwc2/core.h @@ -294,7

Re: [PATCH v3 1/2] staging: dwc2: validate urb-actual_length for OUT endpoints

2013-09-26 Thread Matthijs Kooijman
Hi folks, On Tue, Sep 24, 2013 at 11:08:53AM -0500, Felipe Balbi wrote: On Mon, Sep 23, 2013 at 02:23:33PM -0700, Paul Zimmerman wrote: + if ((urb-actual_length 0 || urb-actual_length urb-length) + !dwc2_hcd_is_pipe_in(urb-pipe_info)) +

[PATCH V2 13/13] staging: dwc2: make dwc2_core_params documentation more complete

2013-08-30 Thread Matthijs Kooijman
are all -1. Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- v2: Rebase on top of Paul's ahbcfg patch and documentation re-ordering patch Fix the documentation for the ahbcfg parameter --- drivers/staging/dwc2/core.h | 85

[PATCH V2 05/13] staging: dwc2: simplify register shift expressions

2013-08-30 Thread Matthijs Kooijman
This commit changes expressions from (val shift) (mask shift) to (val mask) shift. Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 20 ++--- drivers/staging/dwc2/hcd.c | 62

[PATCH V2 06/13] staging: dwc2: add missing shift

2013-08-30 Thread Matthijs Kooijman
to increase readability a bit more. Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/hcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index f11b4f0

[PATCH V2 02/13] staging: dwc2: fix off-by-one in check for max_packet_count parameter

2013-08-30 Thread Matthijs Kooijman
, but the upper limit for the set value was off-by-one. This change makes the check the same as the one for max_transfer_size, which was already correct. Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 2 +- 1 file changed

[PATCH V2 10/13] staging: dwc2: properly mask the GRXFSIZ register

2013-08-30 Thread Matthijs Kooijman
. Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 23 --- drivers/staging/dwc2/hw.h | 2 ++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers

[PATCH V2 11/13] staging: dwc2: interpret all hwcfg and related register at init time

2013-08-30 Thread Matthijs Kooijman
are debug printed after unpacking them, so a bunch of debug prints can be removed from other places. Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- v2: Update to use FIFOSIZE_* constants Use u32 instead of unsigned for temporary variables

[PATCH V2 09/13] staging: dwc2: remove redundant register reads

2013-08-30 Thread Matthijs Kooijman
-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 5799f47..f6494df 100644 --- a/drivers

[PATCH V2 01/13] staging: dwc2: remove specific fifo size constants

2013-08-30 Thread Matthijs Kooijman
those untouched. Also note that the GRXFSIZ register also contains a fifo size, but there is no corresponding start address register (it is always the first fifo in memory), the layout of the GRXFSIZ register is different and cannot use the same constants. Signed-off-by: Matthijs Kooijman matth

Re: staging:DWC2 USB driver issues

2013-08-27 Thread Matthijs Kooijman
Hi Dinh, Any chance anyone has a similar experience with this DWC2 driver, any help will greatly appreciated. Of course, I will go back and verify the initialization between the DWC2 and the old driver to see if I can spot anything. At first glance, the symptoms (getting transaction errors on

Re: [PATCH 2/3] staging: dwc2: add NAK holdoff patch from downstream Pi kernel

2013-08-21 Thread Matthijs Kooijman
Hi Paul, @@ -365,6 +366,7 @@ struct dwc2_hsotg { u8 otg_port; u32 *frame_list; dma_addr_t frame_list_dma; + int next_sched_frame; This variable is still not really used, I think. Most of the mentions in the patch are assignments, except for these two: +

Re: [PATCH 2/3] staging: dwc2: add NAK holdoff patch from downstream Pi kernel

2013-08-12 Thread Matthijs Kooijman
Hi Paul, Add the NAK holdoff patch from the downstream Raspberry Pi kernel. This allows the transfer scheduler to better handle cheeky devices that just hold off using NAKs. @@ -365,6 +366,7 @@ struct dwc2_hsotg { u8 otg_port; u32 *frame_list; dma_addr_t frame_list_dma;

Re: [PATCH 3/3] staging: dwc2: add microframe scheduler from downstream Pi kernel

2013-08-12 Thread Matthijs Kooijman
Hi Paul Dom, I haven't got time to look closely right now, but at first glance most of my comments have been resolved. One thing that is still in there, is this piece of code for which I'm not sure if it is really related to the topic of the patch: @@ -780,6 +784,10 @@ static void

Re: [PATCH 0/3] staging: dwc2: 2nd try at uframe scheduler patch

2013-08-12 Thread Matthijs Kooijman
Hi Paul, Matthijs' concern about periodic endpoints with bInterval=1 seems to be unfounded. I tried a webcam, which uses a bInterval=1 isoc endpoint, on my PCI-based dev board, and it still works fine with this patch applied. For the record, I still think this concern actually exists, but you

Re: [PATCH 03/13] staging: dwc2: unshift non-bool register value constants

2013-08-12 Thread Matthijs Kooijman
Hey Paul, OK, I'm kind of on the fence about this one, so if you prefer it this way I guess it's OK with me. Acked-by: Paul Zimmerman pa...@synopsys.com Thanks. What platforms have you tested this on, BTW? You said you have a Raspberry Pi, so I'd like you to test these patches there

Re: [PATCH 00/13] staging: dwc2: Register-related cleanups

2013-08-05 Thread Matthijs Kooijman
Hi Paul, With the exception of 1 and 13 which I already commented on, you can add my acked-by to the rest of this series. I assume you meant 3 instead of 13 here, given that you commented on patch 3 (about unshifting stuff) but not 13? Gr. Matthijs -- To unsubscribe from this list: send the

Re: [PATCH 03/13] staging: dwc2: unshift non-bool register value constants

2013-08-05 Thread Matthijs Kooijman
Hi Paul, On Wed, Jul 17, 2013 at 06:52:56PM +, Paul Zimmerman wrote: From: Matthijs Kooijman [mailto:matth...@stdin.nl] Sent: Wednesday, July 17, 2013 8:10 AM Various register fields wider than one bit have constants defined for their value. Previously, these registers would define

Re: [PATCH] staging: dwc2: add microframe scheduler from downstream Pi kernel

2013-07-25 Thread Matthijs Kooijman
Hi Paul, Furthermore, I wonder about how this scheduler works exactly. What I see is: - the number usecs needed for a single transfer in a periodic qh is calculated - When the qh is scheduled, the first of the 8 microframes with enough usecs available is picked for this qh

Re: [PATCH] staging: dwc2: add driver parameter to set AHB config register value

2013-07-24 Thread Matthijs Kooijman
Hey Paul, diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h index fc075a7..e771e40 100644 --- a/drivers/staging/dwc2/core.h +++ b/drivers/staging/dwc2/core.h @@ -150,10 +150,11 @@ enum dwc2_lx_state { * are enabled * @reload_ctl:

Re: [PATCH] staging: dwc2: add driver parameter to set AHB config register value

2013-07-24 Thread Matthijs Kooijman
Hey Paul, one more thing: + * -1 - GAHBCFG value will not be overridden This seems incorrect: If it is set to -1, GAHBCFG will be set to 0x06 (INCR4), it is not left unchanged. I'll also include this in my documentation patch. Gr. Matthijs -- To

[PATCH v2] staging: dwc2: Don't touch the dma_mask when dma is disabled

2013-07-24 Thread Matthijs Kooijman
cause problems (when reloading a module, for example). Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman paul.zimmer...@synopsys.com --- v2: Rebased on top of the latest staging-next drivers/staging/dwc2/hcd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers

Re: [PATCH V3] usb: Add Device Tree support to XHCI Platform driver

2013-07-23 Thread Matthijs Kooijman
Hi Alan, This compiles without CONFIG_OF because of_match_ptr() assigns NULL if CONFIG_OF is not defined. Ah, I guess that makes sense :-) Apologies for the noise... Gr. Matthijs -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to

Re: dwc2: Transaction errors with device connected at boot

2013-07-22 Thread Matthijs Kooijman
Hi Paul, I noticed that this bug occurs with the old dwc_otg driver (from the Ralink SDK) as well, so it is not dwc2-specific. However, I also ound out this bug does not occur on another (identical) unit I have (using the old driver), so it seems likely that this is somehow a one-off (hardware)

Re: dwc2: Transaction errors with device connected at boot

2013-07-22 Thread Matthijs Kooijman
Hi Paul, There's no firmware in the HSOTG core, so I don't see how running the driver could permanently damage the core. However, if it's your only good working unit then I guess some paranoia is understandable ;) Well, it was just that I had only one unit where running a clean 3.10 kernel was

[PATCH 0/3] staging: dwc2: Add some dma-related defensive programming

2013-07-19 Thread Matthijs Kooijman
Hi Greg, here's three patches for dwc2, acked by Paul. They're not critical, so no need to push them to 3.11. Gr. Matthijs Matthijs Kooijman (3): staging: dwc2: disable dma when no dma_mask was setup staging: dwc2: when dma is disabled, clear hcd-self.uses_dma staging: dwc2: Don't touch

[PATCH 3/3] staging: dwc2: Don't touch the dma_mask when dma is disabled

2013-07-19 Thread Matthijs Kooijman
cause problems (when reloading a module, for example). Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman paul.zimmer...@synopsys.com --- drivers/staging/dwc2/hcd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c

[PATCH 1/3] staging: dwc2: disable dma when no dma_mask was setup

2013-07-19 Thread Matthijs Kooijman
or addition of new glue layers). Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman paul.zimmer...@synopsys.com --- drivers/staging/dwc2/hcd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index 2ed54b1

[PATCH 2/3] staging: dwc2: when dma is disabled, clear hcd-self.uses_dma

2013-07-19 Thread Matthijs Kooijman
the dma_enable value in dwc2. To prevent problems resulting from a mismatch, better to explicitely disable dma in this case (though everything seemed to work with the wrong value of uses_dma as well, probably only resulted in some unneeded work). Signed-off-by: Matthijs Kooijman matth...@stdin.nl

Re: [PATCH] staging: dwc2: add microframe scheduler from downstream Pi kernel

2013-07-18 Thread Matthijs Kooijman
Hi Paul, The transfer scheduler in the dwc2 driver is pretty basic, not to mention buggy. It works fairly well with just a couple of devices plugged in, but if you add, say, multiple devices with periodic endpoints, the scheduler breaks down and can't even enumerate all the devices. This

Re: [PATCH] staging: dwc2: add driver parameter to set AHB config register value

2013-07-17 Thread Matthijs Kooijman
might serve as inspiration: http://article.gmane.org/gmane.linux.usb.general/85086 (but note this reply: http://article.gmane.org/gmane.linux.usb.general/85104) Signed-off-by: Paul Zimmerman pa...@synopsys.com Reviewed-by: Matthijs Kooijman matth...@stdin.nl However, I do wonder if it makes sense

Re: Incompleteness of HW capability registers (Was: [PATCH] staging: dwc2: fix thinko in dwc2_hc_set_even_odd_frame())

2013-07-17 Thread Matthijs Kooijman
Hey Stephen, Ah, that makes sense. It wasn't clear to me from the config structure that some of the variables didn't correspond directly to config fields/registers in the HW. I have a patch pending that separates configured values from hardware values, which would help here. I'll try to send

[PATCH 04/13] staging: dwc2: only read the snpsid register once

2013-07-17 Thread Matthijs Kooijman
This (read-only) register was read twice, storing it for later use the second time. Now it is only read once, storing it right away. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 05/13] staging: dwc2: simplify register shift expressions

2013-07-17 Thread Matthijs Kooijman
This commit changes expressions from (val shift) (mask shift) to (val mask) shift. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 20 ++--- drivers/staging/dwc2/hcd.c | 62 +++-- drivers/staging/dwc2

[PATCH 02/13] staging: dwc2: fix off-by-one in check for max_packet_count parameter

2013-07-17 Thread Matthijs Kooijman
, but the upper limit for the set value was off-by-one. This change makes the check the same as the one for max_transfer_size, which was already correct. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 11/13] staging: dwc2: interpret all hwcfg and related register at init time

2013-07-17 Thread Matthijs Kooijman
are debug printed after unpacking them, so a bunch of debug prints can be removed from other places. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 308 +-- drivers/staging/dwc2/core.h | 96 +--- drivers

[PATCH 03/13] staging: dwc2: unshift non-bool register value constants

2013-07-17 Thread Matthijs Kooijman
the handling of these values more consistent with other register fields that represent natural numbers instead of enumerations (e.g., number of host channels). Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 52 ++-- drivers/staging/dwc2/hcd.c

[PATCH 13/13] staging: dwc2: make dwc2_core_params documentation more complete

2013-07-17 Thread Matthijs Kooijman
are all -1. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.h | 84 ++--- 1 file changed, 57 insertions(+), 27 deletions(-) diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h index 67d6dc7..c106db8 100644

[PATCH 10/13] staging: dwc2: properly mask the GRXFSIZ register

2013-07-17 Thread Matthijs Kooijman
. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 23 --- drivers/staging/dwc2/hw.h | 2 ++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 5c80b21..025760e

[PATCH 01/13] staging: dwc2: fix naming of register constants

2013-07-17 Thread Matthijs Kooijman
and removes the generic constants. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 10 ++ drivers/staging/dwc2/hw.h | 14 +++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2

[PATCH 08/13] staging: dwc2: re-use hptxfsiz variable

2013-07-17 Thread Matthijs Kooijman
For some reason, the value of the HPTXFSIZ register was built in the ptxfsiz variable, while there was also a hptxfsiz variable availble. Better just use that and remove the (now unused) ptxfsiz variable. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 12

[PATCH 07/13] staging: dwc2: simplify debug output in dwc_hc_init

2013-07-17 Thread Matthijs Kooijman
got removed, since it would always print a fixed value of zero. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2

[PATCH 12/13] staging: dwc2: validate the value for phy_utmi_width

2013-07-17 Thread Matthijs Kooijman
that the default should have been 16. Also, the pci bindings explicitely set the value to 16, so this commit changes the default to 16 bits (if supported, 8 bits otherwise). With the default changed, the value set in pci.c is changed to -1 to make it autodetected as well. Signed-off-by: Matthijs

[PATCH 09/13] staging: dwc2: remove redundant register reads

2013-07-17 Thread Matthijs Kooijman
-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index b199dbd..5c80b21 100644 --- a/drivers/staging/dwc2/core.c +++ b/drivers/staging

[PATCH 3/3] staging: dwc2: Don't touch the dma_mask when dma is disabled

2013-07-17 Thread Matthijs Kooijman
cause problems (when reloading a module, for example). Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index 22ac24c..74498ef 100644 --- a/drivers/staging

[PATCH 1/3] staging: dwc2: disable dma when no dma_mask was setup

2013-07-17 Thread Matthijs Kooijman
or addition of new glue layers). Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index 8cbdbd9..4791d81 100644 --- a/drivers/staging/dwc2/hcd.c +++ b

[PATCH 0/3] staging: dwc2: Add some dma-related defensive programming

2013-07-17 Thread Matthijs Kooijman
Here's a resend of three patches I sent a while ago as part of a bigger series. These were the unimportant patches to be included later, so here they are again. Gr. Matthijs Matthijs Kooijman (3): staging: dwc2: disable dma when no dma_mask was setup staging: dwc2: when dma is disabled

[PATCH 2/3] staging: dwc2: when dma is disabled, clear hcd-self.uses_dma

2013-07-17 Thread Matthijs Kooijman
the dma_enable value in dwc2. To prevent problems resulting from a mismatch, better to explicitely disable dma in this case (though everything seemed to work with the wrong value of uses_dma as well, probably only resulted in some unneeded work). Signed-off-by: Matthijs Kooijman matth...@stdin.nl

Re: [PATCH 00/13] staging: dwc2: Register-related cleanups

2013-07-17 Thread Matthijs Kooijman
Hi Paul, I was about to send out another patch which enhances the scheduling code in the driver. It finally makes the driver work well on the Raspberry Pi, at least in my testing. So I would rather submit that code first rather than risk breaking it with this big set of changes. So can you

Re: [PATCH 01/13] staging: dwc2: fix naming of register constants

2013-07-17 Thread Matthijs Kooijman
Hi Paul, On Wed, Jul 17, 2013 at 06:44:04PM +, Paul Zimmerman wrote: From: Matthijs Kooijman [mailto:matth...@stdin.nl] Sent: Wednesday, July 17, 2013 8:10 AM A generic set of FIFOSIZE_* constants was used for both the GNPTXFSIZ and HPTXFSIZ registers, even where a specific set

dwc2: Invalid (?) initialization of PCGCTL register

2013-07-16 Thread Matthijs Kooijman
Hi Paul, could you perhaps look up some documentation on the PCGCTL register for me? The issue John and I have been facing is that on one particular board, the dwc2 driver fails to initialize saying: dwc2 101c.usb: Bad value for GSNPSID: 0x We've traced this back to the

Incompleteness of HW capability registers (Was: [PATCH] staging: dwc2: fix thinko in dwc2_hc_set_even_odd_frame())

2013-07-15 Thread Matthijs Kooijman
Hi Stephen, I'm not sure how many of the below driver parameters are actually required. I think as least the three fifo size parameters, plus max_transfer_size and max_packet_count, are needed. I'm curious why any of them are required; why aren't the values embedded in the HW registers

Re: [PATCH] staging: dwc2: fix value used in dwc2_set_all_params

2013-07-11 Thread Matthijs Kooijman
...@synopys.com Reviewed-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index 2ed54b1..ca38aaa 100644 --- a/drivers/staging/dwc2/hcd.c +++ b

Re: [PATCH] staging: dwc2: fix thinko in dwc2_hc_set_even_odd_frame()

2013-07-09 Thread Matthijs Kooijman
Hi Paul, As I mentioned in private email, I was not able to get your mainline-based kernel from git://github.com/swarren/linux-rpi.git to boot. Something to try if it's still not working: Try a less fancy SD card. I found that u-boot didn't want to boot a 16GB SDHC card (IIRC), but using an

Re: [PATCH] staging: dwc2: fix value of dma_mask

2013-05-25 Thread Matthijs Kooijman
Hi Paul, On Fri, May 24, 2013 at 04:27:56PM -0700, Paul Zimmerman wrote: Passing the value DMA_BIT_MASK(31) to dma_set_mask() causes the dwc2-pci driver to sometimes fail (cannot enumerate the connected device). Change it to DMA_BIT_MASK(32) instead, which is a more sensible value anyway.

Re: dwc2: Transaction errors with device connected at boot

2013-05-25 Thread Matthijs Kooijman
Hi Paul, I did see a different issue when booting/rebooting the system. I discovered that the DMA_BIT_MASK(31)'s in dwc2_hcd_init() were randomly preventing the controller from working after boot. When I changed both of them to DMA_BIT_MASK(32) the problem went away. I am going to submit a

Re: [PATCH 0/7] staging: dwc2: miscellaneous cleanups

2013-05-17 Thread Matthijs Kooijman
Hi Greg, On Thu, May 16, 2013 at 03:26:25PM -0700, Greg KH wrote: On Mon, May 13, 2013 at 07:08:05PM -0700, Paul Zimmerman wrote: Here are some dwc2 patches which Matthijs submitted just before the merge window opened, looks like they did not get picked up. Please apply. I think I just

Re: [PATCH 1/4] staging: dwc2: Set a default dma_mask for platform devices

2013-05-15 Thread Matthijs Kooijman
Hi Paul, On Wed, May 08, 2013 at 10:46:29PM +0200, Matthijs Kooijman wrote: Paul wrote: Hmm. Is it kosher to override these in a driver and force DMA to be enabled? Apparently, since a lot of drivers do it like this. This particular code was taken from the ehci-platform driver. See also

Re: [PATCH 1/4] staging: dwc2: Set a default dma_mask for platform devices

2013-05-15 Thread Matthijs Kooijman
Hi Paul, No, seems like other folks think it's OK, so I'm fine with it. Great. I'll ack the patches and send them on once Greg starts taking staging patches again. Forgive my ignorance here, but does that mean it'll wait until 3.11, or can it still be included in 3.10? I'd like to get at

Re: [PATCH] USB: set device dma_mask without reference to global data

2013-05-08 Thread Matthijs Kooijman
Hi folks, I also bumped into the question of how to set the dma_mask when enabling the dwc2 driver on the ramips target and found there didn't seem to be any clear way to get a dma_mask. It seems to me that in the pre-DT era, a platform_device would get a dma_mask when it was defined in the

Re: [PATCH] USB: set device dma_mask without reference to global data

2013-05-08 Thread Matthijs Kooijman
Hi, For the ramips target, the MIPS folks suggested another approach: The soc code finds the platform_device generated by DT and adds the dma_mask: http://www.linux-mips.org/archives/linux-mips/2013-04/msg00162.html For completeness: It seems this approach is not going to be used after

Re: [PATCH 1/2] staging: dwc2: when dma is disabled, clear dev-dma_mask

2013-05-08 Thread Matthijs Kooijman
Hi Greg, Greg, is it ok for a HCD to modify hcd-self.uses_dma like this? perhaps you missed this question in my previous mail? :-) Gr. Matthijs diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index d9a2055..18a91de 100644 --- a/drivers/staging/dwc2/hcd.c +++

Re: [PATCH 1/2] staging: dwc2: when dma is disabled, clear dev-dma_mask

2013-05-08 Thread Matthijs Kooijman
+ if (hsotg-core_params-dma_enable = 0) + hcd-self.uses_dma = 0; + hcd-has_tt = 1; spin_lock_init(hsotg-lock); This is okay providing you do it before calling usb_add_hcd(). Great, thanks! Matthijs -- To unsubscribe from this list: send

[PATCH 1/4] staging: dwc2: Set a default dma_mask for platform devices

2013-05-08 Thread Matthijs Kooijman
hardware. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/platform.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/staging/dwc2/platform.c b/drivers/staging/dwc2/platform.c index 74f1b7d..fdf81c2 100644 --- a/drivers/staging/dwc2/platform.c +++ b/drivers

[PATCH 4/4] staging: dwc2: Don't touch the dma_mask when dma is disabled

2013-05-08 Thread Matthijs Kooijman
cause problems (when reloading a module, for example). Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index 18a91de..57c6ee7 100644 --- a/drivers/staging

[PATCH 3/4] staging: dwc2: when dma is disabled, clear hcd-self.uses_dma

2013-05-08 Thread Matthijs Kooijman
the dma_enable value in dwc2. To prevent problems resulting from a mismatch, better to explicitely disable dma in this case (though everything seemed to work with the wrong value of uses_dma as well, probably only resulted in some unneeded work). Signed-off-by: Matthijs Kooijman matth...@stdin.nl

[PATCH 0/4] staging: dwc2: DMA improvements

2013-05-08 Thread Matthijs Kooijman
Hi folks, here's some more dma fixes for the dwc2 driver. The second patch of this series is the same as in my previous series, the others are new. staging: dwc2: Set a default dma_mask for platform devices It would be great if at least this first patch in this series could be included in

[PATCH 2/4] staging: dwc2: disable dma when no dma_mask was setup

2013-05-08 Thread Matthijs Kooijman
-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index eff8e59..d9a2055 100644 --- a/drivers/staging/dwc2/hcd.c +++ b/drivers/staging/dwc2/hcd.c @@ -2740,6

Re: [PATCH 1/4] staging: dwc2: Set a default dma_mask for platform devices

2013-05-08 Thread Matthijs Kooijman
Hi Paul, + /* +* Use reasonable defaults so platforms don't have to provide these. +*/ + if (!dev-dev.dma_mask) + dev-dev.dma_mask = dev-dev.coherent_dma_mask; + if (!dev-dev.coherent_dma_mask) + dev-dev.coherent_dma_mask = DMA_BIT_MASK(32); Hmm.

dwc2: Transaction errors with device connected at boot

2013-05-08 Thread Matthijs Kooijman
Hi Paul, I'm running into an issue with the dwc2 driver. When I power on my board with an usb device (mass storage in this case) connected, the hardware is returning transaction errors (e.g., triggering channel halted + xacterr interrupts) for every transfer scheduled, starting with the first

Re: [PATCH] staging: dwc2: use devm_ioremap_resource()

2013-05-02 Thread Matthijs Kooijman
laurent.na...@gmail.com --- drivers/staging/dwc2/pci.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Patch looks good, I had a bit-for-bit identical patch in my queue here as well :-) Reviewed-by: Matthijs Kooijman matth...@stdin.nl Gr. Matthijs diff --git a/drivers

Re: [PATCH 1/2] staging: dwc2: when dma is disabled, clear dev-dma_mask

2013-05-02 Thread Matthijs Kooijman
Hi Paul ( Greg), On Thu, May 02, 2013 at 01:23:42AM +, Paul Zimmerman wrote: From: Paul Zimmerman Sent: Monday, April 29, 2013 6:27 PM From: Matthijs Kooijman [mailto:matth...@stdin.nl] Sent: Monday, April 29, 2013 7:33 AM } else { - dma_set_mask(hsotg-dev, 0

Re: [PATCH v2 0/4] dwc2: Interrupt-related cleanups

2013-04-29 Thread Matthijs Kooijman
Hi Paul, I already have a new version of the other patches prepared as well (with a bit less invasive changes), but I haven't thoroughly reviewed those yet (and I'm out of time until monday, so I thought to send over these easy patches already now). I reconsidered this and I'll keep the rest

[PATCH 0/2] staging: dwc2: Improve dma enable consistency

2013-04-29 Thread Matthijs Kooijman
Hi folks, with the dwc2 driver, it is currently possible to have mismatch between dma-enable status between the usb core and the dwc2 driver because they use different ways to check for dma enable status. These two patches make sure that these two remain consistent. Gr. Matthijs Matthijs

[PATCH 1/2] staging: dwc2: when dma is disabled, clear dev-dma_mask

2013-04-29 Thread Matthijs Kooijman
-specific stuff that isn't needed (though everything seemed to work with the wrong value of uses_dma as well). Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers

[PATCH 2/7] staging: dwc2: use dwc2_hcd_get_frame_number where possible

2013-04-29 Thread Matthijs Kooijman
Before, there were two places that manually read the FRNUM registers, while there is a function to do this. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 8 +--- drivers/staging/dwc2/hcd_intr.c | 5 + 2 files changed, 2 insertions(+), 11

[PATCH 3/7] staging: dwc2: add helper variable to simplify code

2013-04-29 Thread Matthijs Kooijman
Now a register is masked only in once place, instead of twice. This makes the two uses of this value shorter so they no longer need to be linewrapped. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd_intr.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH 0/7] dwc2: Miscelaneous cleanups

2013-04-29 Thread Matthijs Kooijman
series. Gr. Matthijs Matthijs Kooijman (6): staging: dwc2: replace some magic numbers by constants staging: dwc2: use dwc2_hcd_get_frame_number where possible staging: dwc2: add helper variable to simplify code staging: dwc2: remove some device-mode related debug code staging: dwc2: remove

[PATCH 7/7] staging: dwc2: remove some useless debug prints

2013-04-29 Thread Matthijs Kooijman
This removes some debug prints from pci.c and makes platform.c and pci.c a bit more similar again. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/pci.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/dwc2/pci.c b/drivers/staging/dwc2/pci.c

[PATCH 4/7] staging: dwc2: remove some device-mode related debug code

2013-04-29 Thread Matthijs Kooijman
This code appears to be partially incorrect. Since this is only debug code and only applies to device mode, it seems better to remove this code for now than to invest time fixing it. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 19 --- 1

[PATCH 5/7] staging: dwc2: remove unneeded check

2013-04-29 Thread Matthijs Kooijman
The value in params-enable_dynamic_fifo can only be true if the corresponding bit in hwcfg2 is set, this is already checked by dwc2_set_param_enable_dynamic_fifo. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 6/7] staging: dwc2: add const to handling of dwc2_core_params

2013-04-29 Thread Matthijs Kooijman
, for example). Signed-off-by: Stephen Warren swar...@wwwdotorg.org [matth...@stdin.nl: Split patch from bigger patch, marked dwc2_module_params in pci.c as const and added commit message] Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2

[PATCH 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-29 Thread Matthijs Kooijman
There were already macros for these, they just weren't being used in a few places. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging

Re: [PATCH 02/10] staging: dwc2: do not handle PRTINT in dwc2_handle_common_intr

2013-04-25 Thread Matthijs Kooijman
Hey Paul, In the current code / my patches I also have SOF, NPTxFEmp and RxFLvl marked (and handled) as a host interrupt, but I suspect that these three are used for device mode as well? However, since we don't have device handlers for them already, shouldn't they be cleared by

Re: [PATCH 03/10] staging: dwc2: move some interrupt enabling around

2013-04-25 Thread Matthijs Kooijman
Hi Paul, Before, the DISCONNINT interrupt was enabled in dwc2_enable_host_interrupts, but handled in dwc2_handle_common_intr, while the RXFLVL interrupt was enabled in dwc2_enable_commont_interrupts and handled in dwc_handle_hcd_intr. And, the RXFLVL interrupt is a host+device mode

Re: [PATCH 03/10] staging: dwc2: move some interrupt enabling around

2013-04-25 Thread Matthijs Kooijman
Hi Paul, If RXFLVL is a host+device mode interrupt, doesn't it make sense to enable it in both enable_host_interrupts and (the future) enable_device_interrupts instead of in enable_common_interrupts? Hmm, I just realized the underlying thing here is that I'm distinguishing common interrupts

Re: [PATCH 02/10] staging: dwc2: do not handle PRTINT in dwc2_handle_common_intr

2013-04-25 Thread Matthijs Kooijman
Hey Paul, What say we just defer this change for now? Once we go to add the device-mode handling, we will probably find out that further changes will be required anyway. Possibly, yeah. In any case, I'm about to send a new patch series which has the easy fixes up front and then tries to make

[PATCH v2 0/4] dwc2: Interrupt-related cleanups

2013-04-25 Thread Matthijs Kooijman
monday, so I thought to send over these easy patches already now). Gr. Matthijs Matthijs Kooijman (4): staging: dwc2: do not use IRQF_DISABLED staging: dwc2: use irq_return_t for interrupt handlers staging: dwc2: rename dwc2_hcd_intr() to dwc2_handle_hcd_intr() staging: dwc2: remove

[PATCH 1/4] staging: dwc2: do not use IRQF_DISABLED

2013-04-25 Thread Matthijs Kooijman
. * DEPRECATED. This flag is a NOOP and scheduled to be removed Signed-off-by: Matthijs Kooijman matth...@stdin.nl Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging

[PATCH 4/4] staging: dwc2: remove dummy interrupt handling

2013-04-25 Thread Matthijs Kooijman
-by: Matthijs Kooijman matth...@stdin.nl --- v2: New patch, replacing disable I2CINT in dwc2_disable_host_interrupts --- drivers/staging/dwc2/core_intr.c | 9 + drivers/staging/dwc2/hcd_intr.c | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/staging/dwc2

  1   2   3   >