[PATCH] usb: dwc2: Add reset control to dwc2

2016-08-09 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen Acked-by: John Youn Tested-by: Stefan Wahren

[RESEND PATCH] usb: dwc2: Add reset control to dwc2

2016-06-03 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen Acked-by: John Youn Tested-by: Stefan Wahren

[RESEND PATCH] usb: dwc2: Add reset control to dwc2

2016-06-03 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen Acked-by: John Youn Tested-by: Stefan Wahren

[PATCHv7] usb: dwc2: Add reset control to dwc2

2016-04-25 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v7: Use devm_reset_control_get_optional() v6: fix 80 line checkpatch warning in

[PATCHv6 2/2] usb: dwc2: Add reset control to dwc2

2016-04-20 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v6: fix 80 line checkpatch warning in dev_err print v5: updated error conditions

[PATCH 1/2] Documentation: dt-bindings: dwc2: add the resets and reset-names property

2016-04-20 Thread dinguyen
From: Dinh Nguyen Document the optional 'resets' and 'reset-names' property for the DWC2 usb core. Signed-off-by: Dinh Nguyen Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/dwc2.txt | 3 +++ 1

[PATCHv5] usb: dwc2: Add reset control to dwc2

2016-04-14 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v5: updated error conditions for not finding the reset property v4: use dev_dbg()

[PATCH 1/2] Documentation: dt-bindings: dwc2: add the resets and reset-names property

2016-04-13 Thread dinguyen
From: Dinh Nguyen Document the optional 'resets' and 'reset-names' property for the DWC2 usb core. Signed-off-by: Dinh Nguyen --- Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland

[PATCHv3 2/2] usb: dwc2: Add reset control to dwc2

2016-04-13 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v4: use dev_dbg() if not a -EPROBE_DEFER v3: fix compile error v2: move to

[PATCHv3] usb: dwc2: Add reset control to dwc2

2016-04-11 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v3: fix compile error v2: move to lowlevel_hw_init() --- drivers/usb/dwc2/core.h

[PATCHv2] usb: dwc2: Add reset control to dwc2

2016-04-11 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v2: move to lowlevel_hw_init() --- drivers/usb/dwc2/core.h |1 +

[PATCH RESEND 2/2] ARM: socfpga: dts: add reset control for USB

2016-04-05 Thread dinguyen
From: Dinh Nguyen Add the resets property for the 2 USB controllers. Signed-off-by: Dinh Nguyen Cc: John Youn Cc: Felipe Balbi --- arch/arm/boot/dts/socfpga.dtsi |4

[PATCH RESEND 1/2] usb: dwc2: Add reset control to dwc2

2016-04-05 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen Cc: John Youn Cc: Felipe Balbi --- Resend

[PATCH 1/2] usb: dwc2: Add reset control to dwc2

2016-03-29 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen Cc: John Youn --- drivers/usb/dwc2/core.h |1 +

[PATCH 2/2] ARM: socfpga: dts: add reset control for USB

2016-03-29 Thread dinguyen
From: Dinh Nguyen Add the resets property for the 2 USB controllers. Signed-off-by: Dinh Nguyen --- arch/arm/boot/dts/socfpga.dtsi |4 arch/arm/boot/dts/socfpga_arria10.dtsi |4 2 files changed, 8

[PATCH] usb: dwc2: fix unnecessary USB overcurrent condition

2015-05-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com For platforms that use a ULPI phy, we should enable the external VbusValid signal instead. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Cc: Gregory Herrero gregory.herr...@intel.com Cc: Mian Yousaf Kaukab yousaf.kau...@intel.com Cc:

[PATCH] usb: dwc2: remove early return on clock query

2014-11-24 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Since we have assigned clk=NULL, which is a valid clk, we should not be returning when a clock node is not provide. Instead, we should return only when we cannot enable the clock. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com ---

[PATCHv7 0/8] usb: dwc2: Add support for dual-role

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Hello, This is version 7 of the patch series that combines the dwc2 gadget and host driver into a single dual role driver. Here are the main differences from V6: - patch 1/8: Addressed Felipe's comment on which variables should not be just

[PATCHv7 8/8] usb: dwc2: Update Kconfig to support dual-role

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, dwc2.ko is built for host, peripheral, and dual-role

[PATCHv7 7/8] usb: dwc2: move usb_disabled() call to host driver only

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Since platform.c will get built for both Host and Gadget, if we leave the usb_disabled() call in platform.c, it results in the following build error when (!USB USB_GADGET) condition is met. ERROR: usb_disabled [drivers/usb/dwc2/dwc2_platform.ko]

[PATCHv7 5/8] usb: dwc2: Update common interrupt handler to call gadget interrupt handler

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Make dwc2_handle_common_intr call the gadget interrupt function when operating in peripheral mode. Remove the spinlock functions in s3c_hsotg_irq as dwc2_handle_common_intr() already has the spinlocks. Move the registeration of the IRQ to common

[PATCHv7 6/8] usb: dwc2: gadget: Do not fail probe if there isn't a clock node

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Since the dwc2 hcd driver is currently not looking for a clock node during init, we should not completely fail if there isn't a clock provided. By assigning clk = NULL, this allows the driver, when configured for dual-role mode, to be able to

[PATCHv7 1/8] usb: dwc2: Update the gadget driver to use common dwc2_hsotg structure

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. To keep the driver data dereference code looking clean, the gadget variable declares are only available for peripheral and dual-role

[PATCHv7 2/8] usb: dwc2: Move gadget probe function into platform code

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com This patch will aggregate the probing of gadget/hcd driver into platform.c. The gadget probe funtion is converted into gadget_init that is now only responsible for gadget only initialization. All the gadget resources are now handled by platform.c

[PATCHv7 3/8] usb: dwc2: convert to use dev_pm_ops API

2014-11-11 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update suspend/resume to use dev_pm_ops API. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/platform.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc2/platform.c

[PATCHv6 6/8] usb: dwc2: gadget: Do not fail probe if there isn't a clock node

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Since the dwc2 hcd driver is currently not looking for a clock node during init, we should not completely fail if there isn't a clock provided. For dual-role mode, we will only fail init for a non-clock node error. We then update the HCD to only

[PATCHv6 7/8] usb: dwc2: Update Kconfig to support dual-role

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, dwc2.ko is built for host, peripheral, and dual-role

[PATCHv6 2/8] usb: dwc2: Move gadget probe function into platform code

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com This patch will aggregate the probing of gadget/hcd driver into platform.c. The gadget probe funtion is converted into gadget_init that is now only responsible for gadget only initialization. All the gadget resources is now handled by platform.c

[PATCHv6 5/8] usb: dwc2: Add call_gadget functions for perpheral mode interrupts

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update the dwc2 wakeup and suspend interrupt functions to use call_gadget when the IP is in peripheral mode. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/usb/dwc2/core_intr.c |

[PATCHv6 4/8] usb: dwc2: Update common interrupt handler to call gadget interrupt handler

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Make dwc2_handle_common_intr call the gadget interrupt function when operating in peripheral mode. Remove the spinlock functions in s3c_hsotg_irq as dwc2_handle_common_intr() already has the spinlocks. Move the registeration of the IRQ to common

[PATCHv6 1/8] usb: dwc2: Update the gadget driver to use common dwc2_hsotg structure

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. To keep the driver data dereference code looking clean, the gadget variable declares are only available for peripheral and dual-role

[PATCHv6 3/8] usb: dwc2: Initialize the USB core for peripheral mode

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Initialize the USB driver to peripheral mode when a B-Device connector is attached. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- v5: move the export of s3c_hsotg_core_init into this

[PATCHv6 0/8] usb: dwc2: Add support for dual-role

2014-10-28 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Hello, This is version 6 of the patch series that combines the dwc2 gadget and host driver into a single dual role driver. Here are the main differences from V5: - Added a new patch 8/8 - usb: dwc2: move usb_disabled() call to host driver only.

[PATCH] usb: dwc2: allow dwc2 to get built when USB_GADGET=m

2014-10-21 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com This patch allows the gadget portion of the DWC2 driver to get built when (!USB USB_GADGET) condition is encountered. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/Kconfig | 2 +- 1 file changed, 1 insertion(+),

[PATCHv5 0/7] usb: dwc2: Add support for dual-role

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Hello, This is version 5 of the patch series that combines the dwc2 gadget and host driver into a single dual role driver. Here are the main differences from V4: - Squashed 5 patches from V4 into patch 2. Patchset is now only 7 patches. -

[PATCHv5 3/7] usb: dwc2: Initialize the USB core for peripheral mode

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Initialize the USB driver to peripheral mode when a B-Device connector is attached. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- v5: move the export of s3c_hsotg_core_init into this

[PATCHv5 7/7] usb: dwc2: Update Kconfig to support dual-role

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, dwc2.ko is built for host, peripheral, and dual-role

[PATCHv5 4/7] usb: dwc2: Update common interrupt handler to call gadget interrupt handler

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Make dwc2_handle_common_intr call the gadget interrupt function when operating in peripheral mode. Remove the spinlock functions in s3c_hsotg_irq as dwc2_handle_common_intr() already has the spinlocks. Move the registeration of the IRQ to common

[PATCHv5 5/7] usb: dwc2: Add call_gadget functions for perpheral mode interrupts

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update the dwc2 wakeup and suspend interrupt functions to use call_gadget when the IP is in peripheral mode. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/usb/dwc2/core_intr.c |

[PATCHv5 1/7] usb: dwc2: Update the gadget driver to use common dwc2_hsotg structure

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. To keep the driver data dereference code looking clean, the gadget variable declares are only available for peripheral and dual-role

[PATCHv5 2/7] usb: dwc2: Move gadget probe function into platform code

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com This patch will aggregate the probing of gadget/hcd driver into platform.c. The gadget probe funtion is converted into gadget_init that is now only responsible for gadget only initialization. All the gadget resources is now handled by platform.c

[PATCHv5 6/7] usb: dwc2: gadget: Do not fail probe if there isn't a clock node

2014-10-20 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Since the dwc2 hcd driver is currently not looking for a clock node during init, we should not completely fail if there isn't a clock provided. For dual-role mode, we will only fail init for a non-clock node error. We then update the HCD to only

[RFC PATCH 0/2] usb: dwc2: Enable URB giveback in a tasklet context

2014-09-15 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Hi Ming-Lei, Thanks for your patch to enable the URB giveback in a tasklet context for the EHCI driver. I found your patch to fix a USB webcam timeout/stutter issue on the DWC2 HCD in the SOCFPGA platform. However, I need your help trying to

[RFC PATCH 2/2] usb-core: Remove the local_irq_save/local_irq_restore around complete

2014-09-15 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com When enabling HCD_BH for the DWC2 HCD, these local_irq_save/local_irq_restore was causing a timeout with a webcam. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/core/hcd.c | 2 -- 1 file changed, 2 deletions(-) diff

[RFC PATCH 1/2] usb: dwc2: Enable HCD_BH in the dwc2 driver

2014-09-15 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Enable the support of running URB giveback in tasklet context. Remove spinlocks around URB giveback as these are not needed when running in the tasklet. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/hcd.c | 6

[PATCHv4 00/12] usb: dwc2: Add support for dual role

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Hello, This is version 4 of the patch series that combines the dwc2 gadget and host driver into a single dual role driver. Here are the main differences from V2: - Patch 9/12 : Move spin_lock_init() earlier up in the function to guarantee no

[PATCHv4 03/12] usb: dwc2: Update the gadget driver to use common dwc2_hsotg structure

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. To keep the driver data dereference code looking clean, the gadget variable declares are only available for peripheral and dual-role

[PATCHv4 01/12] usb: dwc2: Update Kconfig to support dual-role

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, only dwc2.ko is needed. Signed-off-by: Dinh Nguyen

[PATCHv4 07/12] usb: dwc2: Add call_gadget functions for perpheral mode interrupts

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update the dwc2 wakeup and suspend interrupt functions to use call_gadget when the IP is in peripheral mode. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/usb/dwc2/core_intr.c |

[PATCHv4 09/12] usb: dwc2: initialize the spin_lock for both host and gadget

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Move spin_lock_init to common location for both host and gadget. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- v4: move spin_lock_init up to make sure sure no locks can be taken before the init. --- drivers/usb/dwc2/hcd.c

[PATCHv4 05/12] usb: dwc2: Initialize the USB core for peripheral mode

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Initialize the USB driver to peripheral mode when a B-Device connector is attached. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/usb/dwc2/hcd.c | 1 + 1 file changed, 1

[PATCHv4 10/12] usb: dwc2: Add suspend/resume for gadget

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Move suspend/resume code to common platform code. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/usb/dwc2/core.h | 6 ++ drivers/usb/dwc2/gadget.c | 4 ++--

[PATCHv4 12/12] usb: dwc2: pci: Update pci portion of the dwc2 driver

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Initialize the spinlock here as the original spinlock in the host driver has been removed. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- v4: moved spin_lock_init() up to make sure no locks can be taken before the init. ---

[PATCHv4 11/12] usb: dwc2: check that the host work queue is valid

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com The Host workqueue will not get initialized if the driver is configured for peripheral mode only. Thus we need to check for wq_otg before calling queue_work(). Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman

[PATCHv4 04/12] usb: dwc2: Add the appropriate init calls in platform code

2014-08-26 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Add the proper init calls for either host, gadget or both in platform.c Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Paul Zimmerman pa...@synopsys.com --- drivers/usb/dwc2/core.h | 13 +

[PATCHv3 11/12] usb: dwc2: check that the host work queue is valid

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com The Host workqueue will not get initialized if the driver is configured for peripheral mode only. Thus we need to check for wq_otg before calling queue_work(). Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com ---

[PATCHv3 10/12] usb: dwc2: Add suspend/resume for gadget

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Move suspend/resume code to common platform code. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/core.h | 6 ++ drivers/usb/dwc2/gadget.c | 4 ++-- drivers/usb/dwc2/platform.c | 23

[PATCHv3 02/12] usb: dwc2: move samsung,s3c6400-hsotg into common platform

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Move the samsung,s3c6400-hsotg binding as the probe function in the gadget driver will get removed when the dual-role driver is implemented. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/gadget.c | 1 -

[PATCHv3 04/12] usb: dwc2: Add the appropriate init calls in platform code

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Add the proper init calls for either host, gadget or both in platform.c Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/core.h | 13 + drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/platform.c

[PATCHv3 08/12] usb: dwc2: gadget: Do not fail probe if there isn't a clock node

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Since the dwc2 hcd driver is currently not looking for a clock node during init, we should not completely fail if there isn't a clock provided. Add a check for a valid clock before calling clock functions. Signed-off-by: Dinh Nguyen

[PATCHv3 09/12] usb: dwc2: initialize the spin_lock for both host and gadget

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Move spin_lock_init to common location for both host and gadget. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/hcd.c | 1 - drivers/usb/dwc2/platform.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)

[PATCHv3 05/12] usb: dwc2: Initialize the USB core for peripheral mode

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Initialize the USB driver to peripheral mode when a B-Device connector is attached. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/hcd.c

[PATCHv3 03/12] usb: dwc2: Update the gadget driver to use common dwc2_hsotg structure

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. To keep the driver data dereference code looking clean, the gadget variable declares are only available for peripheral and dual-role

[PATCHv3 07/12] usb: dwc2: Add call_gadget functions for perpheral mode interrupts

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update the dwc2 wakeup and suspend interrupt functions to use call_gadget when the IP is in peripheral mode. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/core_intr.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCHv3 01/12] usb: dwc2: Update Kconfig to support dual-role

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, only dwc2.ko is needed. Signed-off-by: Dinh Nguyen

[PATCHv3 12/12] usb: dwc2: pci: Update pci portion of the dwc2 driver

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Initialize the spinlock here as the original spinlock in the host driver has been removed. Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCHv3 00/12] usb: dwc2: Add support for dual role

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Hello, This is version 3 of the patch series that combines the dwc2 gadget and host driver into a single dual role driver. Here are the main differences from V2: - less code change: v3: 9 files changed, 340 insertions(+), 335 deletions(-)

[PATCHv3 06/12] usb: dwc2: Update common interrupt handler to call gadget interrupt handler

2014-08-08 Thread dinguyen
From: Dinh Nguyen dingu...@opensource.altera.com Make dwc2_handle_common_intr call the gadget interrupt function when operating in peripheral mode. Remove the spinlock functions in s3c_hsotg_irq as dwc2_handle_common_intr() already has the spinlocks. Remove duplicate interrupt conditions that

[PATCHv2 00/13] usb: dwc2: Add support for dual role

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Hello, This is version 2 of the patch series that combines the dwc2 gadget and host driver into a single dual role driver. Here are the main differences from V1: - less code change: v1: 9 files changed, 877 insertions(+), 904 deletions(-)

[PATCHv2 13/13] usb: dwc2: pci: Update pci portion of the dwc2 driver

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Initialize the spinlock here as the original spinlock in the host driver has been removed. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/pci.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c

[PATCHv2 08/13] usb: dwc2: Add call_gadget functions for perpheral mode interrupts

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Update the dwc2 wakeup and suspend interrupt functions to use call_gadget when the IP is in peripheral mode. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core_intr.c |2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCHv2 04/13] usb: dwc2: update gadget portion to use common dwc2_hsotg structure

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Update gadget.c to use the dwc2_hsotg data structure and gadget pointers that have been moved into the common dwc2_hsotg structure. Along with the updating the gadget driver to use the common dwc2_hsotg structure, a few other things are required in order for

[PATCHv2 06/13] usb: dwc2: Initialize the USB core for peripheral mode

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Initialize the USB driver to peripheral mode when a B-Device connector is attached. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/hcd.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/hcd.c

[PATCHv2 11/13] usb: dwc2: Add suspend/resume for gadget

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Move suspend/resume code to common platform code. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core.h |6 ++ drivers/usb/dwc2/gadget.c |4 ++-- drivers/usb/dwc2/platform.c | 23 +++ 3 files

[PATCHv2 01/13] usb: dwc2: Update Kconfig to support dual-role

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, only dwc2.ko is needed. Signed-off-by: Dinh Nguyen

[PATCHv2 05/13] usb: dwc2: Add the appropriate init calls in platform code

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Add the proper init calls for either host, gadget or both in platform.c Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core.h | 13 + drivers/usb/dwc2/gadget.c |2 +- drivers/usb/dwc2/platform.c | 28

[PATCHv2 02/13] usb: dwc2: Moves s3c_hsotg gadget data structure into dwc2_hsotg

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. This is needed so that the dwc2_hsotg data structure can be used by the hcd and gadget drivers. Signed-off-by: Dinh Nguyen dingu...@altera.com ---

[PATCHv2 07/13] usb: dwc2: Update common interrupt handler to call gadget interrupt handler

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Make dwc2_handle_common_intr call the gadget interrupt function when operating in peripheral mode. Remove the spinlock functions in s3c_hsotg_irq as dwc2_handle_common_intr() already has the spinlocks. Remove duplicate interrupt conditions that was in

[PATCHv2 03/13] usb: dwc2: move samsung,s3c6400-hsotg into common platform

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Move the samsung,s3c6400-hsotg binding as the probe function in the gadget driver will get removed when the dual-role driver is implemented. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/gadget.c |1 - drivers/usb/dwc2/platform.c

[PATCHv2 09/13] usb: dwc2: gadget: Do not fail probe if there isn't a clock node

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Since the dwc2 hcd driver is currently not looking for a clock node during init, we should not completely fail if there isn't a clock provided. Add a check for a valid clock before calling clock functions. Signed-off-by: Dinh Nguyen dingu...@altera.com ---

[PATCHv2 10/13] usb: dwc2: initialize the spin_lock for both host and gadget

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Move spin_lock_init to common location for both host and gadget. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/hcd.c |1 - drivers/usb/dwc2/platform.c |1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCHv2 12/13] usb: dwc2: check that the host work queue is valid

2014-07-30 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com The Host workqueue will not get initialized if the driver is configured for peripheral mode only. Thus we need to check for wq_otg before calling queue_work(). Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core_intr.c |8 +---

[PATCH 08/12] usb: dwc2: gadget: Do not fail probe if there isn't a clock node

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Since the dwc2 hcd driver is currently not looking for a clock node during init, we should not completely fail if there isn't a clock provided. Add a check for a valid clock before calling clock functions. Signed-off-by: Dinh Nguyen dingu...@altera.com ---

[PATCH 05/12] usb: dwc2: Add the appropriate init calls in platform code

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Add the proper init calls for either host, gadget or both in platform.c Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core.h |3 +++ drivers/usb/dwc2/gadget.c |2 +- drivers/usb/dwc2/platform.c | 29

[PATCH 12/12] usb: dwc2: pci: Update pci portion of the dwc2 driver

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Initialize the spinlock here as the original spinlock in the host driver has been removed. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/pci.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c

[PATCH 02/12] usb: dwc2: Moves s3c_hsotg gadget data structure into dwc2_hsotg

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. This is needed so that the dwc2_hsotg data structure can be used by the hcd and gadget drivers. Signed-off-by: Dinh Nguyen dingu...@altera.com ---

[PATCH 07/12] usb: dwc2: Move gadget interrupts to common interrupt handler

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Update dwc2_handle_common_intr() to handle both hcd and gadget interrupts. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core_intr.c | 116 +- drivers/usb/dwc2/gadget.c| 188

[PATCH 01/12] usb: dwc2: Update Kconfig to support dual-role

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, only dwc2.ko is needed. Signed-off-by: Dinh Nguyen

[PATCH 04/12] usb: dwc2: Add DTS compatible string to dwc2_of_match_table

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Puts back samsung,s3c6400-hsotg into the dwc2_of_match_table[]. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/platform.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c

[PATCH 09/12] usb: dwc2: initialize the spin_lock for both host and gadget

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Move spin_lock_init to common location for both host and gadget. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/hcd.c |1 - drivers/usb/dwc2/platform.c |1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 06/12] usb: dwc2: Initialize the USB core for peripheral mode

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Initialize the USB driver to peripheral mode when a B-Device connector is attached. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/hcd.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/hcd.c

[PATCH 10/12] usb: dwc2: Add suspend/resume for gadget

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Move suspend/resume code to common platform code. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/platform.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/usb/dwc2/platform.c

[PATCH 00/12] usb: dwc2: Add support for dual role

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Hello, This patch series combines the dwc2 gadget and host driver into a single dual role driver. Here is a breakdown of what each patch does: 1/2 : usb: dwc2: Update Kconfig to support dual-role - Changes the Kconfig and Makefile to build a single

[PATCH 11/12] usb: dwc2: check that the host work queue is valid

2014-07-16 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com The Host workqueue will not get initialized if the driver is configured for peripheral mode only. Thus we need to check for wq_otg before calling queue_work(). Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core_intr.c |8 +---

[PATCH] usb: dwc2: fix sparse warning in platform.c

2014-06-27 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com This patch fixes this sparse warning: drivers/usb/dwc2/platform.c:168:25: warning: incorrect type in argument 1 (different address spaces) drivers/usb/dwc2/platform.c:168:25:expected void const *ptr drivers/usb/dwc2/platform.c:168:25:got void

[PATCH 02/15] usb: dwc2: add necessary function declares for dual role

2014-06-20 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com There are functions in gadget driver that needs to get exported so that the common interrupt handler can call. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/core.h | 52 +++

[PATCH 00/15] usb: dwc2: Add support for dual-role

2014-06-20 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Hi, This patch series combines the dwc2 host and gadget driver into a single dual-role driver. I have tested this on the SOCFPGA platform. I compile tested for bcm2835_defconfig and a PCI platform. I split up the patches to make the review a bit easier, but

[PATCH 01/15] usb: dwc2: Moves s3c_hsotg gadget data structure into dwc2_hsotg

2014-06-20 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Adds the gadget data structure and appropriate data structure pointers to the common dwc2_hsotg data structure. This is needed so that the dwc2_hsotg data structure can be used by the hcd and gadget drivers. Signed-off-by: Dinh Nguyen dingu...@altera.com ---

[PATCH 04/15] usb: dwc2: gadget: Change the gadget probe function into gadget_init

2014-06-20 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com gadget_init() will get called from the platform probe function. Signed-off-by: Dinh Nguyen dingu...@altera.com --- drivers/usb/dwc2/gadget.c | 144 + 1 file changed, 55 insertions(+), 89 deletions(-) diff --git

[PATCH 07/15] usb: dwc2: gadget: Do not fail probe if there isn't a clock node

2014-06-20 Thread dinguyen
From: Dinh Nguyen dingu...@altera.com Since the dwc2 hcd driver is currently not looking for a clock node during init, we should not completely fail if there isn't a clock provided. Add a check for a valid clock before calling clock functions. Signed-off-by: Dinh Nguyen dingu...@altera.com ---

  1   2   >