Re: [RFC PATCH v1 13/14] usb:cdns3: Adds debugging function.

2018-11-03 Thread Joe Perches
On Sat, 2018-11-03 at 17:51 +, Pawel Laszczak wrote: > Patch implements some function used for debugging driver. [] > +static inline char *cdns3_decode_ep_irq(u32 ep_sts, const char *ep_name) > +{ > + static char str[256]; > + int ret; > + > + ret = sprintf(str, "IRQ for %s: %08x ",

[RFC PATCH v1 00/14] Introduced new Cadence USBSS DRD Driver

2018-11-03 Thread Pawel Laszczak
This patch set introduce new Cadence USBSS DRD driver to linux kernel. The Cadence USBSS DRD Driver s a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI) configurations. The current driver has been validated with FPGA burned. We

[RFC PATCH v1 01/14] usb:cdns3: add pci to platform driver wrapper.

2018-11-03 Thread Pawel Laszczak
Patch adds PCI specific glue drivier that creaties and registers in system cdns-usb3 platform device. Thanks to that we will be able to use the cdns-usb3 platform driver for USBSS-DEV controller build on PCI board Signed-off-by: Pawel Laszczak --- drivers/usb/Kconfig| 2 + driv

[RFC PATCH v1 04/14] usb:cdns3: Added DRD support

2018-11-03 Thread Pawel Laszczak
Patch adds supports for detecting Host/Device mode. Controller has additional OTG register that allow implement even whole OTG functionality. At this moment patch adds support only for detecting the appropriate mode based on strap pins and ID pin. Signed-off-by: Pawel Laszczak --- drivers/usb/cd

[RFC PATCH v1 07/14] usb:cdns3: Implements device operations part of the API

2018-11-03 Thread Pawel Laszczak
Patch adds implementation callback function defined in usb_gadget_ops object. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 244 - 1 file changed, 242 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/g

[RFC PATCH v1 05/14] usb:cdns3: Added Wrapper to XCHI driver

2018-11-03 Thread Pawel Laszczak
Patch implements functions that allow to initialize, start and stop XHCI host driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/host.c | 230 ++- 1 file changed, 227 insertions(+), 3 deletions(-) diff --git a/drivers/usb/cdns3/host.c b/drivers/usb/c

[RFC PATCH v1 02/14] usb:cdns3: Device side header file.

2018-11-03 Thread Pawel Laszczak
Patch defines macros used by device side of controller, structures holding registers, and some other object used by device controller. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.h | 1067 1 file changed, 1067 insertions(+) create mode 100644

[RFC PATCH v1 08/14] usb:cdns3: EpX operations part of the API

2018-11-03 Thread Pawel Laszczak
Patch implements callback functions for non-default endpoints defined in usb_ep_ops object. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 18 ++ drivers/usb/cdns3/gadget.c | 430 - drivers/usb/cdns3/gadget.h | 3 + 3 files changed, 449 inse

[RFC PATCH v1 06/14] usb:cdns3: Initialization code for Device side

2018-11-03 Thread Pawel Laszczak
Patch implements a set of functions responsible for initialization, configuration, starting and stopping device mode. This patch also adds new ep0.c that holds all functions related to endpoint 0. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 +- drivers/usb/cdns3/ep0.c|

[RFC PATCH v1 09/14] usb:cdns3: Ep0 operations part of the API

2018-11-03 Thread Pawel Laszczak
Patch implements related to default endpoint callback functions defined in usb_ep_ops object Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 188 - drivers/usb/cdns3/gadget.c | 8 ++ drivers/usb/cdns3/gadget.h | 10 ++ 3 files changed, 204 in

[RFC PATCH v1 10/14] usb:cdns3: Implements ISR functionality.

2018-11-03 Thread Pawel Laszczak
Patch adds set of generic functions used for handling interrupts generated by controller. Interrupt related functions are divided into three groups. The first is related to ep0 and is placed in ep0.c. The second is responsible for non-default endpoints and is implemented in gadget.c file. The last

[RFC PATCH v1 13/14] usb:cdns3: Adds debugging function.

2018-11-03 Thread Pawel Laszczak
Patch implements some function used for debugging driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 +- drivers/usb/cdns3/debug.c | 128 + drivers/usb/cdns3/ep0.c| 3 + drivers/usb/cdns3/gadget.c | 12 drivers/usb/cdns3/ga

[RFC PATCH v1 11/14] usb:cdns3: Adds enumeration related function.

2018-11-03 Thread Pawel Laszczak
Patch implements a set of function related to enumeration process. Some standard requests are handled on controller driver level and other are delegated to gadget core driver. All class requests are delegated to gadget core driver. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/ep0.c| 4

[RFC PATCH v1 03/14] usb:cdns3: Driver initialization code.

2018-11-03 Thread Pawel Laszczak
Patch adds core.c and core.h file that implements initialization of platform driver and adds function responsible for selecting, switching and running appropriate Device/Host mode. Patch also adds gadget.c, host.c, gadget-export.h, host-export.h. These files contains templates functions used durin

[RFC PATCH v1 12/14] usb:cdns3: Adds transfer related function.

2018-11-03 Thread Pawel Laszczak
Patch implements a set of function handling transfer on none-default endpoints. For handling transfer controller use cdns3_trb structure. Each transfer request block (TRB) contains data buffer address, length and some control bits. Each transfer can consist of many trbs. Such group of trbs is calle

[RFC PATCH v1 14/14] usb:cdns3: Feature for changing role

2018-11-03 Thread Pawel Laszczak
Patch adds feature that allow to change role from user space. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3/Makefile | 2 +- drivers/usb/cdns3/core.c| 2 + drivers/usb/cdns3/debugfs.c | 94 + drivers/usb/cdns3/drd.h | 3 ++ 4 files changed, 1