RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-23 Thread Pawel Laszczak
Hi, >Hi, > >On 22/07/19 12:02 AM, Pawel Laszczak wrote: >> + >> +/** >> + * cdns3_req_ep0_get_status - Handling of GET_STATUS standard USB request >> + * @priv_dev: extended gadget object >> + * @ctrl_req: pointer to received setup packet >> + * >

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-19 Thread Pawel Laszczak
Hi, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripher

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-10 Thread Pawel Laszczak
Hi Felipe >>> + >>> +static int cdns3_idle_init(struct cdns3 *cdns) >>> +{ >>> + struct cdns3_role_driver *rdrv; >>> + >>> + rdrv = devm_kzalloc(cdns->dev, sizeof(*rdrv), GFP_KERNEL); >>> + if (!rdrv) >>> + return -ENOMEM; >>> + >>> + rdrv->start = cdns3_idle_role_start; >>> +

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-09 Thread Pawel Laszczak
> > >Hi, > >Pawel Laszczak writes: >>>>>> IRQF_ONESHOT can be used only in threaded handled. >>>>>> " >>>>>> * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler >>>&g

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-09 Thread Pawel Laszczak
> >Hi, > >Pawel Laszczak writes: >>>> IRQF_ONESHOT can be used only in threaded handled. >>>> " >>>> * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler >>>> finished. >>>> *Used

RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-09 Thread Pawel Laszczak
>-Original Message- >From: Felipe Balbi >Sent: Tuesday, July 9, 2019 8:30 AM >To: Pawel Laszczak >Cc: gre...@linuxfoundation.org; linux-...@vger.kernel.org; rog...@ti.com; >linux-kernel@vger.kernel.org; jbergsa...@ti.com; >nsek...@ti.com; n...@ti.com; Sure

RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-09 Thread Pawel Laszczak
Hi, > >Hi, > >Pawel Laszczak writes: >> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h >> index 69f1b6328532..c156817672c4 100644 >> --- a/include/linux/usb/otg.h >> +++ b/include/linux/usb/otg.h >> @@ -129,4 +129,20 @@ enum usb_dr_

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-08 Thread Pawel Laszczak
>Hi, > >Pawel Laszczak writes: >>>> +void cdns3_role_stop(struct cdns3 *cdns) >>> >>>not static? Why is it so that _start() is static but _stop() is not? >>>Looks fishy >> >> This function is used in cdns3_role_stop in debugfs.c file so

[PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-08 Thread Pawel Laszczak
Patch introduces new function usb_dr_mode_to_string for converting dual role mod to string and removes static from usb_dr_mode_to_string definition. Both changes have made to avoid duplication of code by cdns3 driver. Signed-off-by: Pawel Laszczak --- drivers/usb/common/common.c | 12

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-08 Thread Pawel Laszczak
> >(please send it as a formal patch from now on) I will send it. I think even today. > >Hi, > >Pawel Laszczak writes: >> The prototype was added , but not all text was past. Sorry for that. >> >> Fixed version: with your changes

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-08 Thread Pawel Laszczak
> >Hi, > >Pawel Laszczak writes: >> Please look at the changes in drivers/usb/common/common.c file. >> I'm going to add it as next patch to next version. >> >> >>>Pawel Laszczak writes: >>>>>> +void cdns3_role_stop(stru

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-08 Thread Pawel Laszczak
Hi Felipe Please look at the changes in drivers/usb/common/common.c file. I'm going to add it as next patch to next version. >Pawel Laszczak writes: >>>> +void cdns3_role_stop(struct cdns3 *cdns) > >>>> +static const char *const cdns3_mode[] =

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-07 Thread Pawel Laszczak
Hi Felipe, > >Hi, > >Pawel Laszczak writes: >> diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c >> new file mode 100644 >> index ..ddc73f1c87c5 >> --- /dev/null >> +++ b/drivers/usb/cdns3/core.c >> @@ -0,0 +

RE: [PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-07-05 Thread Pawel Laszczak
> > >On Fri, Jul 05, 2019 at 11:39:57AM +0000, Pawel Laszczak wrote: >> >> >On Fri, Jul 05, 2019 at 11:57:14AM +0100, Pawel Laszczak wrote: >> >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> >> to driver/usb/ga

RE: [PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-07-05 Thread Pawel Laszczak
>EXTERNAL MAIL > > > >Hi, > >Pawel Laszczak writes: >> diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h >> index da82606be605..d388a3a5ab7e 100644 >> --- a/include/linux/usb/ch9.h >> +++ b/include/linux/usb/ch9.h >&

RE: [PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-07-05 Thread Pawel Laszczak
>On Fri, Jul 05, 2019 at 11:57:14AM +0100, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/gadget/debug.c file. These moved functions include: >> dwc3_decode_get_status >> dw

[PATCH v9 3/6] usb:gadget Patch simplify usb_decode_set_clear_feature function.

2019-07-05 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 89 ++ 1 file changed, 43

[PATCH v9 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-05 Thread Pawel Laszczak
ice. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6): dt-bindings: add binding for USBSS-DRD controller. usb:gadget Separated decoding functions from dwc3 driver. usb:gadget Patch simplify usb_decode_set_clear_feature function. usb:gadget Simpl

[PATCH v9 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-07-05 Thread Pawel Laszczak
-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 330 - drivers/usb/cdns3/gadget.h | 13 ++ 2 files changed, 341 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 4e9e8e43f634..63cde269db98 100644

[PATCH v9 4/6] usb:gadget Simplify usb_decode_get_set_descriptor function.

2019-07-05 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v9 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-07-05 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/cdns-usb3.txt | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation

[PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-07-05 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/gadget.h file. Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 5 + drivers/usb/common/debug.c | 268

RE: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Pawel Laszczak
Hi, > >Hi, > >Greg KH writes: > >> On Thu, Jul 04, 2019 at 12:44:08PM +0300, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Pawel Laszczak writes: >>> >>> >> >>> >> >>> >>Hi, >>> >

RE: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Pawel Laszczak
>> >> >>Hi, >> >>Pawel Laszczak writes: >> >>>> >>>>Hi, >>>> >>>>On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrote: >>>>> >>>>> On Thu, Jul 04, 2019 at 04:34:58PM +1000,

RE: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Pawel Laszczak
> > >Hi, > >Pawel Laszczak writes: > >>> >>>Hi, >>> >>>On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrote: >>>> >>>> On Thu, Jul 04, 2019 at 04:34:58PM +1000, Stephen Rothwell wrote: >>>> > Hi all, >

RE: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Pawel Laszczak
> >Hi, > >On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrote: >> >> On Thu, Jul 04, 2019 at 04:34:58PM +1000, Stephen Rothwell wrote: >> > Hi all, >> > >> > After merging the usb tree, today's linux-next build (arm >> > multi_v7_defconfig) failed like this: >> > >> > arm-linux-gnueabi-ld:

[PATCH v8 4/6] usb:gadget Simplify usb_decode_get_set_descriptor function.

2019-07-02 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/gadget/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v8 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-07-02 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/gadget.h file. Signed-off-by: Pawel Laszczak --- drivers/usb/dwc3/debug.h| 252

[PATCH v8 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-02 Thread Pawel Laszczak
ved ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6): dt-bindings: add binding for USBSS-DRD controller. usb:gadget Separated decoding functions from dwc3 driver. usb:gadget Patch simplify usb_decode_set_clear_feat

[PATCH v8 3/6] usb:gadget Patch simplify usb_decode_set_clear_feature function.

2019-07-02 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/gadget/debug.c | 89 ++ 1 file changed, 43

[PATCH v8 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-07-02 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/cdns-usb3.txt | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation

[PATCH v8 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-07-02 Thread Pawel Laszczak
-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 330 - drivers/usb/cdns3/gadget.h | 13 ++ 2 files changed, 341 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 4e9e8e43f634..63cde269db98 100644

RE: [PATCH v7 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-06-10 Thread Pawel Laszczak
> >> - reg-names - register memory area names: >> "xhci" - for HOST registers space >> "dev" - for DEVICE registers space >> "otg" - for OTG/DRD registers space >> - compatible: Should contain: >> "cdns,usb3-1.0.0" - for 0x00024502 controller version >>

RE: [PATCH v7 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-06-10 Thread Pawel Laszczak
>On Wed, Jun 05, 2019 at 11:03:49AM +0100, Pawel Laszczak wrote: >> diff --git a/drivers/usb/cdns3/debugfs.c b/drivers/usb/cdns3/debugfs.c >> new file mode 100644 >> index ..dfcbeb5e14f8 >> --- /dev/null >> +++ b/drivers/usb/cdns3/debugfs.c >>

RE: [PATCH v7 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-06-10 Thread Pawel Laszczak
>On Wed, Jun 05, 2019 at 11:03:46AM +0100, Pawel Laszczak wrote: > >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver > >> to driver/usb/common/debug.c file. These moved functions include: > >> dwc3_decode_get_status > >

RE: [PATCH v7 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-06-09 Thread Pawel Laszczak
>> >>> >>> Pawel, >>> >>> On 05/06/2019 13:03, Pawel Laszczak wrote: >>>> This patch aim at documenting USB related dt-bindings for the >>>> Cadence USBSS-DRD controller. >>>> >>>> Signed-off-by: Pawel Las

RE: [PATCH v7 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-06-07 Thread Pawel Laszczak
> >On 05/06/2019 13:03, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Driver is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >

RE: [PATCH v7 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-06-06 Thread Pawel Laszczak
> >Pawel, > >On 05/06/2019 13:03, Pawel Laszczak wrote: >> This patch aim at documenting USB related dt-bindings for the >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> Reviewed-by: Rob Herring >> >> ---

RE: [PATCH v7 0/6] Introduced new Cadence USBSS DRD Driver.

2019-06-05 Thread Pawel Laszczak
>On 6/5/2019 17:03, Pawel Laszczak wrote: >> This patch introduces new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Driver is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >&g

[PATCH v7 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-06-05 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file.i Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 2 +- drivers/usb/common/debug.c | 273

[PATCH v7 0/6] Introduced new Cadence USBSS DRD Driver.

2019-06-05 Thread Pawel Laszczak
ing with Felipe suggestion. --- Pawel Laszczak (6): dt-bindings: add binding for USBSS-DRD controller. usb:common Separated decoding functions from dwc3 driver. usb:common Patch simplify usb_decode_set_clear_feature function. usb:common Simplify usb_decode_get_set_descriptor funct

[PATCH v7 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-06-05 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v7 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-06-05 Thread Pawel Laszczak
-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 330 - drivers/usb/cdns3/gadget.h | 13 ++ 2 files changed, 341 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index f3b22ec43c0a..30bcf972f848 100644

[PATCH v7 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-06-05 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/cdns-usb3.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation

[PATCH v7 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-06-05 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 89 ++ 1 file changed, 43

RE: [PATCH v6 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-06-04 Thread Pawel Laszczak
>>> On 10/04/19 1:18 PM, Pawel Laszczak wrote: >>>> +static void cdns3_wa1_tray_restore_cycle_bit(struct cdns3_device >>>> *priv_dev, >>>> + struct cdns3_endpoint *priv_ep) >>>> +{ >>>

RE: [PATCH v6 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-06-04 Thread Pawel Laszczak
> >On 10/04/19 1:18 PM, Pawel Laszczak wrote: >> +static void cdns3_wa1_tray_restore_cycle_bit(struct cdns3_device *priv_dev, >> + struct cdns3_endpoint *priv_ep) >> +{ >> +int dma_index; >> +u32 doorbell; >>

RE: [PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-03-06 Thread Pawel Laszczak
Hi, >Hi, > >On 21/02/2019 09:14, Felipe Balbi wrote: >> >> Hi, >> >> (please break your emails at 80-columns) >> >> Pawel Laszczak writes: >>>>> One more thing. Workaround has implemented algorithm that decide for which >>>&g

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-06 Thread Pawel Laszczak
Hi, >Pawel, > >On 14/02/2019 21:45, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi >> can be instantiated as Dual-Role Device (DRD), Perip

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-04 Thread Pawel Laszczak
>From: Pawel Laszczak >Sent: Monday, March 4, 2019 12:02 PM >To: Chunfeng Yun >Cc: devicet...@vger.kernel.org; gre...@linuxfoundation.org; >felipe.ba...@linux.intel.com; mark.rutl...@arm.com; linux- >u...@vger.kernel.org; hdego...@redhat.com; heikki.kroge...@linux.intel.c

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-04 Thread Pawel Laszczak
Hi, > >hi, >On Thu, 2019-02-14 at 19:45 +0000, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi >> can be instantiated as Dual-Role Device (DRD),

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-04 Thread Pawel Laszczak
Hi, > >On Thu, Feb 14, 2019 at 07:45:13PM +, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to linux kernel. > >Nit, "Linux" :) > >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi > >"whichi&quo

RE: [PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-02-20 Thread Pawel Laszczak
> >On 20/02/2019 13:18, Pawel Laszczak wrote: >> Hi Roger. >>> >>> On 14/02/2019 21:45, Pawel Laszczak wrote: >>>> Controller for OUT endpoints has shared on-chip buffers for all incoming >>>> packets, including ep0out. It's FIFO buffer,

RE: [PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-02-20 Thread Pawel Laszczak
Hi Roger. > >On 14/02/2019 21:45, Pawel Laszczak wrote: >> Controller for OUT endpoints has shared on-chip buffers for all incoming >> packets, including ep0out. It's FIFO buffer, so packets must be handle >> by DMA in correct order. If the first packet in the buffe

RE: [PATCH v4 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-19 Thread Pawel Laszczak
Hi, >On Thu, Feb 14, 2019 at 07:45:10PM +0000, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >> dwc3_decode_get_status >> dw

[PATCH v4 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-02-14 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 89 ++ 1 file changed, 43

[PATCH v4 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-02-14 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-02-14 Thread Pawel Laszczak
in function driver. This work around can be disabled/enabled by means of quirk_internal_buffer module parameter. By default feature is enabled. It can has impact to transfer performance and in most case this feature can be disabled. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 273

[PATCH v4 0/6] Introduced new Cadence USBSS DRD Driver.

2019-02-14 Thread Pawel Laszczak
array - removed cdns3_free_trb_pool and cdns3_ep_addr_to_bit_pos macros. - removed ep0_trb_dma, ep0_trb fields from cdns3_device. - Removed ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6): dt-bindings: add

[PATCH v4 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-14 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 2 +- drivers/usb/common/debug.c | 270

[PATCH v4 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-02-14 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns-usb3.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns

RE: [PATCH v3 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-02-13 Thread Pawel Laszczak
Hi Rob, >On Thu, Jan 31, 2019 at 11:52:28AM +0000, Pawel Laszczak wrote: >> This patch aim at documenting USB related dt-bindings for the >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../devicetree/bindings/usb/cdns-usb3

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-11 Thread Pawel Laszczak
> >Pawel Laszczak writes: >>>>> +/** >>>>> + * usb_decode_ctrl - Returns human readable representation of control >>>>> request. >>>>> + * @str: buffer to return a human-readable representation of control >>>>> r

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-11 Thread Pawel Laszczak
Hi, > >Greg KH writes: >> On Thu, Jan 31, 2019 at 11:52:29AM +, Pawel Laszczak wrote: >>> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >>> to driver/usb/common/debug.c file. These moved functions include:

RE: [PATCH v3 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-02-11 Thread Pawel Laszczak
>On Thu, Jan 31, 2019 at 11:52:31AM +0000, Pawel Laszczak wrote: >> Patch moves switch responsible for decoding descriptor type >> outside snprintf. It's little improves code readability. > >Should that last sentence read: "It improves code readability a little"? > Yes, it should. Thanks Pawel

RE: [PATCH v3 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-02-05 Thread Pawel Laszczak
Hi, >On Thu, Jan 31, 2019 at 11:52:32AM +0000, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role De

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-05 Thread Pawel Laszczak
H Greg > >On Thu, Jan 31, 2019 at 11:52:29AM +, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >> dwc3_decode_get_status >>

[PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-01-31 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. mend Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 2 +- drivers/usb/common/debug.c

[PATCH v3 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-01-31 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 83 ++ 1 file changed, 40

[PATCH v3 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-01-31 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns-usb3.txt | 33 +++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns

[PATCH v3 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-01-31 Thread Pawel Laszczak
in function driver. This work around can be disabled/enabled by means of quirk_internal_buffer module parameter. By default feature is enabled. It can has impact to transfer performance and in most case this feature can be disabled. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 273

[PATCH v3 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-01-31 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It's little improves code readability. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 111 +++-- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/drivers

[PATCH v3 0/6] Introduced new Cadence USBSS DRD Driver.

2019-01-31 Thread Pawel Laszczak
to common eps array - removed cdns3_free_trb_pool and cdns3_ep_addr_to_bit_pos macros. - removed ep0_trb_dma, ep0_trb fields from cdns3_device. - Removed ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2019-01-09 Thread Pawel Laszczak
Hi, >On Thu, Jan 10, 2019 at 09:30:41AM +0800, Peter Chen wrote: >> On Mon, Dec 24, 2018 at 12:44 AM Pawel Laszczak wrote: >> - debugfs is nice to have feature, I suggest removing it at this >> initial version. Besides, role switch >> through /sys is normal fe

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-31 Thread Pawel Laszczak
Hi >On Sun, 2018-12-23 at 15:13 +0000, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. > ><...> > >> diff --git a/drivers/usb/cdns3/cdns3-pci-wrap.c >> b/drivers/usb/cdns3/cdns3-pci-wrap.c >> new file

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-31 Thread Pawel Laszczak
ing: restricted __le16 degrades to > integer > > drivers/usb/common/debug.c:256:25: warning: restricted __le16 degrades to > integer > > drivers/usb/common/debug.c:257:25: warning: restricted __le16 degrades to > integer > > drivers/usb/common/debug.

RE: [PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-30 Thread Pawel Laszczak
Hi Bob, >> >> >On Mon, Dec 10, 2018 at 12:39:14PM +, Pawel Laszczak wrote: >> >> This patch aim at documenting USB related dt-bindings for the >> >> Cadence USBSS-DRD controller. >> >> >> >> Signed-off-by: Pawel Laszczak > >

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-30 Thread Pawel Laszczak
Hi Peter, > >> > >> >@@ -299,6 +306,7 @@ int cdns3_drd_init(struct cdns3 *cdns) >> >cdns->version = CDNS3_CONTROLLER_V0; >> >cdns->otg_v1_regs = NULL; >> >cdns->otg_regs = regs; >> >+ writel(0x1, >otg_v0_regs->simulate); >> >

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-27 Thread Pawel Laszczak
j-$(CONFIG_USB_CDNS3_PCI_WRAP) += cdns3-pci-wrap.o >+obj-$(CONFIG_USB_CDNS3_IMX_WRAP) += cdns3-imx.o > > >> diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c >> new file mode 100644 >> index ..b0c32302eb0b >> --- /dev/null >>

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-27 Thread Pawel Laszczak
Hi, >> > + >> > + if (ret) >> > + return ret; >> > + >> > + state = readl(>otg_regs->sts); >> > + if (OTGSTS_OTG_NRDY(state) != 0) { >> > + dev_err(cdns->dev, "Cadence USB3 OTG device not ready\n"); >> > + return -ENODEV; >> > + }

[PATCH v2 3/5] usb:common Patch simplify usb_decode_set_clear_feature function.

2018-12-23 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 83 ++ 1 file changed, 40

[PATCH v2 4/5] usb:common Simplify usb_decode_get_set_descriptor function.

2018-12-23 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It's little improves code readability. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 111 +++-- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/drivers

[PATCH v2 2/5] usb:common Separated decoding functions from dwc3 driver.

2018-12-23 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. mend Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 2 +- drivers/usb/common/debug.c

[PATCH v2 0/5] Introduced new Cadence USBSS DRD Driver.

2018-12-23 Thread Pawel Laszczak
cdns3_device. - Removed ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (5): dt-bindings: add binding for USBSS-DRD controller. usb:common Separated decoding functions from dwc3 driver. usb:common Patch simplify

[PATCH v2 1/5] dt-bindings: add binding for USBSS-DRD controller.

2018-12-23 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns3-usb.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns3

RE: [PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-22 Thread Pawel Laszczak
Hi Rob, >On Mon, Dec 10, 2018 at 12:39:14PM +0000, Pawel Laszczak wrote: >> This patch aim at documenting USB related dt-bindings for the >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../devicetree/bindings/usb/cdns3-usb

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Pawel Laszczak
Hi, > +static irqreturn_t cdns3_device_irq_handler(int irq, void *data) +{ + struct cdns3_device *priv_dev; + struct cdns3 *cdns = data; + irqreturn_t ret = IRQ_NONE; + unsigned long flags; + u32 reg; + + priv_dev = cdns->gadget_dev; +

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Pawel Laszczak
Hi Felipe > >Pawel Laszczak writes: > > >>>> + case USB_REQ_SET_ISOCH_DELAY: >>>> + sprintf(str, "Set Isochronous Delay Delay: %d ns", wValue); >>>> + break; >>>> + default: >>>> + spri

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-16 Thread Pawel Laszczak
Hi, > >On 12/12/18 12:22 PM, Felipe Balbi wrote: >> >> Hi >> >> Pawel Laszczak writes: >>>>> + cdns->phy = devm_phy_get(dev, "cdns3,usbphy"); >>>>> + if (IS_ERR(cdns->phy)) { >>>>> + ret = PTR_ERR

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-16 Thread Pawel Laszczak
Hi > >On 14/12/18 4:56 PM, Felipe Balbi wrote: >> Hi, >> >> Sekhar Nori writes: All this should be part of comments in code along with information about controller versions which suffer from the errata. Is there a version of controller available

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-16 Thread Pawel Laszczak
Hi Peter >On Mon, Dec 10, 2018 at 8:55 PM Pawel Laszczak wrote: >> >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-R

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-13 Thread Pawel Laszczak
Hi, > >On Wed, Dec 12, 2018 at 3:49 AM Pawel Laszczak wrote: >> >> Hi, >> >> >On 10/12/18 7:42 AM, Peter Chen wrote: >> >>>> +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, >> >>>> +

RE: [PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-13 Thread Pawel Laszczak
Hi, >On Tue, Dec 11, 2018 at 6:19 PM Roger Quadros wrote: >> >> Pawel, >> >> On 10/12/18 14:39, Pawel Laszczak wrote: >> > This patch aim at documenting USB related dt-bindings for the >> > Cadence USBSS-DRD controller. >> > >> &g

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 7:42 AM, Peter Chen wrote: +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, + struct usb_endpoint_descriptor *desc, + struct usb_ss_ep_comp_descriptor

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >> +static int cdns3_probe(struct platform_device *pdev) >> +{ >> +struct device *dev = >dev; >> +struct resource *res; >> +struct cdns3 *cdns; >> +void __iomem *regs; >> +int ret; >> + &

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 14:39, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD),

[PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-10 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns3-usb.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns3

[PATCH v1 0/2] Introduced new Cadence USBSS DRD Driver.

2018-12-10 Thread Pawel Laszczak
have support for PCIe bus, which is used on FPGA prototyping. The host site of USBSS controller is compliance with XHCI specification, so it works with standard XHCI linux driver. --- Pawel Laszczak (2): dt-bindings: add binding for USBSS-DRD controller. usb:cdns3 Add Cadence USB3 DRD Driver

RE: [RFC PATCH v2 03/15] dt-bindings: add binding for USBSS-DRD controller.

2018-12-06 Thread Pawel Laszczak
Hi, >On Sun, Nov 18, 2018 at 10:08:59AM +0000, Pawel Laszczak wrote: >> Thsi patch aim at documenting USB related dt-bindings for the > >typo > >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../

RE: [RFC PATCH v2 03/15] dt-bindings: add binding for USBSS-DRD controller.

2018-12-06 Thread Pawel Laszczak
Hi, >On Sun, Nov 18, 2018 at 10:08:59AM +0000, Pawel Laszczak wrote: >> Thsi patch aim at documenting USB related dt-bindings for the > >typo > >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../

<    1   2   3   4   >