[U-Boot] [UBOOT RFC PATCH 00/13] DRA7xx: Add DWC3 USB driver and enable DFU

2014-08-18 Thread Kishon Vijay Abraham I
-usb Let me know of any feedback and suggestions. Known Issues: DWC3 is not enumerating consistently. Kishon Vijay Abraham I (13): include: linux: preparation for porting dwc3 from linux kernel usb: gadget: udc-core: Add minimal udc-core from linux kernel ARM: DRA7: Enable clocks for USB OTGSS

[U-Boot] [UBOOT RFC PATCH 02/13] usb: gadget: udc-core: Add minimal udc-core from linux kernel

2014-08-18 Thread Kishon Vijay Abraham I
In order to support multiple USB device controllers in uboot, udc-core is needed. udc-core also helps to cleanly link the USB peripheral driver with the gadget driver. Hence Ported minimal udc-core from linux kernel. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/gadget

[U-Boot] [UBOOT RFC PATCH 01/13] include: linux: preparation for porting dwc3 from linux kernel

2014-08-18 Thread Kishon Vijay Abraham I
Fixes a bunch of header files in linux/usb in order to seamlessly port dwc3 usb driver from linux kernel to uboot. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- include/linux/compat.h | 12 +-- include/linux/usb/composite.h | 12 +++ include/linux/usb/gadget.h

[U-Boot] [UBOOT RFC PATCH 06/13] usb: dwc3: TI PHY: PHY driver for dwc3 in TI platforms

2014-08-18 Thread Kishon Vijay Abraham I
Added a single driver for both USB2 PHY programming and USB3 PHY programming. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/ti_usb_phy.c | 269 ++ include/ti-usb-phy-uboot.h| 22 3

[U-Boot] [UBOOT RFC PATCH 05/13] usb: dwc3-omap: Add dwc3 glue driver for OMAP

2014-08-18 Thread Kishon Vijay Abraham I
Ported dwc3-omap driver from linux kernel to uboot. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/Makefile | 2 + drivers/usb/dwc3/dwc3-omap.c | 447 ++ include/dwc3-omap-uboot.h | 32 +++ include/linux/usb/dwc3

[U-Boot] [UBOOT RFC PATCH 08/13] common: cmd_dfu: invoke board_usb_cleanup() for cleaning up

2014-08-18 Thread Kishon Vijay Abraham I
Invoked board_usb_cleanup for cleaning up initialized USB. It will be invoked if the user enterts ctrl-C. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- common/cmd_dfu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index a03538d..1e7d50c 100644

[U-Boot] [UBOOT RFC PATCH 10/13] board: ti: DRA7: added USB initializtion code

2014-08-18 Thread Kishon Vijay Abraham I
Implemented board_usb_init(), board_usb_cleanup() and board_usb_gadget_handle_interrupts() in dra7xx board file that can be invoked by various gadget drivers. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/include/asm/arch-omap5/omap.h | 12 board/ti/dra7xx/evm.c

[U-Boot] [UBOOT RFC PATCH 11/13] commom: usb: implement __weak functions to make compiler happy

2014-08-18 Thread Kishon Vijay Abraham I
Implemented __weak functions for board_usb_cleanup, board_usb_gadget_handle_interrupts and usb_gadget_handle_interrupts to get of compiler errors in platforms that haven't implemented these functions. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- common/usb.c | 18 ++ 1

[U-Boot] [UBOOT RFC PATCH 09/13] common: cmd_dfu: add an API that takes controller index for handling interrupts

2014-08-18 Thread Kishon Vijay Abraham I
-by: Kishon Vijay Abraham I kis...@ti.com --- common/cmd_dfu.c | 1 + include/usb.h| 7 +++ 2 files changed, 8 insertions(+) diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index 1e7d50c..f27ba52 100644 --- a/common/cmd_dfu.c +++ b/common/cmd_dfu.c @@ -52,6 +52,7 @@ static int do_dfu

[U-Boot] [UBOOT RFC PATCH 12/13] include: configs: Enable DWC3 and DFU in DRA7xx

2014-08-18 Thread Kishon Vijay Abraham I
Enabled dwc3, dwc3-omap and PHY for dwc3 are enabled. Also enabled support for DFU. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- include/configs/dra7xx_evm.h | 59 +++ include/configs/ti_omap5_common.h | 1 + 2 files changed, 60 insertions

[U-Boot] [UBOOT RFC PATCH 13/13] dwc3: core: Change the bounce buffer size to 4096

2014-08-18 Thread Kishon Vijay Abraham I
Bounce buffer is used for transferring requests which is not maxpacket aligned. In the case of DFU the requests can be upto 4096 bytes. While the actual fix for this should be using two chained TRBs to handle the transfer, this can be used as a temporary fix. Signed-off-by: Kishon Vijay Abraham

[U-Boot] [UBOOT RFC PATCH 03/13] ARM: DRA7: Enable clocks for USB OTGSS and USB PHY

2014-08-18 Thread Kishon Vijay Abraham I
Enabled clocks for dwc3 controller and USB PHY present in DRA7. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/cpu/armv7/omap5/hw_data.c | 14 ++ arch/arm/cpu/armv7/omap5/prcm-regs.c | 6 -- arch/arm/include/asm/omap_common.h | 4 ++-- 3 files changed, 20

[U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor

2014-08-18 Thread Kishon Vijay Abraham I
Explicity set the max packet size in the device descriptor to 0x40 as specified in the device class specification for device firmware upgrade. Also changed debug to printf to explicitly notify the user if the device has been enumerated. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com

Re: [U-Boot] [UBOOT RFC PATCH 02/13] usb: gadget: udc-core: Add minimal udc-core from linux kernel

2014-08-19 Thread Kishon Vijay Abraham I
On Monday 18 August 2014 08:06 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:24PM +0530, Kishon Vijay Abraham I wrote: In order to support multiple USB device controllers in uboot, udc-core is needed. udc-core also helps to cleanly link the USB peripheral driver with the gadget

Re: [U-Boot] [UBOOT RFC PATCH 02/13] usb: gadget: udc-core: Add minimal udc-core from linux kernel

2014-08-19 Thread Kishon Vijay Abraham I
is not needed for kernel. Trying to have the exact same code from kernel complicates it. Thanks Kishon Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/udc-core.c | 229 ++ 2 files changed

Re: [U-Boot] [UBOOT RFC PATCH 04/13] usb: dwc3: Add dwc3 driver

2014-08-19 Thread Kishon Vijay Abraham I
On Monday 18 August 2014 08:07 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:26PM +0530, Kishon Vijay Abraham I wrote: Ported dwc3 driver from linux kernel to uboot. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- Makefile|1 + drivers/usb/dwc3

Re: [U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor

2014-08-19 Thread Kishon Vijay Abraham I
Hi, On Monday 18 August 2014 08:08 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:29PM +0530, Kishon Vijay Abraham I wrote: Explicity set the max packet size in the device descriptor to 0x40 as specified in the device class specification for device firmware upgrade. Also changed debug

Re: [U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor

2014-08-19 Thread Kishon Vijay Abraham I
On Monday 18 August 2014 08:26 PM, Lukasz Majewski wrote: Hi Kishon, Explicity set the max packet size in the device descriptor to 0x40 as specified in the device class specification for device firmware upgrade. Also changed debug to printf to explicitly notify the user if the device has

Re: [U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor

2014-08-19 Thread Kishon Vijay Abraham I
On Tuesday 19 August 2014 09:09 PM, Felipe Balbi wrote: Hi, On Tue, Aug 19, 2014 at 09:04:06PM +0530, Kishon Vijay Abraham I wrote: On Monday 18 August 2014 08:08 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:29PM +0530, Kishon Vijay Abraham I wrote: Explicity set the max packet

Re: [U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor

2014-08-19 Thread Kishon Vijay Abraham I
On Tuesday 19 August 2014 09:18 PM, Felipe Balbi wrote: Hi, On Tue, Aug 19, 2014 at 09:12:29PM +0530, Kishon Vijay Abraham I wrote: @@ -987,7 +987,6 @@ static int composite_bind(struct usb_gadget *gadget) memcpy(cdev-desc, composite-dev, sizeof(struct

Re: [U-Boot] [UBOOT RFC PATCH 02/13] usb: gadget: udc-core: Add minimal udc-core from linux kernel

2014-08-19 Thread Kishon Vijay Abraham I
On Tuesday 19 August 2014 08:58 PM, Felipe Balbi wrote: On Tue, Aug 19, 2014 at 08:48:36PM +0530, Kishon Vijay Abraham I wrote: Hi Lukasz, On Tuesday 19 August 2014 02:22 PM, Lukasz Majewski wrote: Hi Kishon, In order to support multiple USB device controllers in uboot, udc-core

Re: [U-Boot] [UBOOT RFC PATCH 09/13] common: cmd_dfu: add an API that takes controller index for handling interrupts

2014-08-19 Thread Kishon Vijay Abraham I
to modify them all). However such an API can only be added in board file so added board_usb_gadget_handle_interrupts(). usb_gadget_handle_interrupts() should be deprecated. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- common/cmd_dfu.c | 1 + include/usb.h| 7 +++ 2 files

Re: [U-Boot] [UBOOT RFC PATCH 10/13] board: ti: DRA7: added USB initializtion code

2014-08-19 Thread Kishon Vijay Abraham I
Hi Felipe, On Monday 18 August 2014 08:10 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:32PM +0530, Kishon Vijay Abraham I wrote: Implemented board_usb_init(), board_usb_cleanup() and board_usb_gadget_handle_interrupts() in dra7xx board file that can be invoked by various gadget

Re: [U-Boot] [UBOOT RFC PATCH 11/13] commom: usb: implement __weak functions to make compiler happy

2014-08-19 Thread Kishon Vijay Abraham I
-by: Kishon Vijay Abraham I kis...@ti.com --- common/usb.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/common/usb.c b/common/usb.c index 60daa10..892bf7c 100644 --- a/common/usb.c +++ b/common/usb.c @@ -1072,4 +1072,22 @@ int board_usb_init(int index, enum

Re: [U-Boot] [UBOOT RFC PATCH 13/13] dwc3: core: Change the bounce buffer size to 4096

2014-08-19 Thread Kishon Vijay Abraham I
Hi, On Monday 18 August 2014 08:11 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:35PM +0530, Kishon Vijay Abraham I wrote: Bounce buffer is used for transferring requests which is not maxpacket aligned. In the case of DFU the requests can be upto 4096 bytes. While the actual fix

Re: [U-Boot] [UBOOT RFC PATCH 10/13] board: ti: DRA7: added USB initializtion code

2014-08-22 Thread Kishon Vijay Abraham I
On Tuesday 19 August 2014 09:56 PM, Felipe Balbi wrote: On Tue, Aug 19, 2014 at 09:43:48PM +0530, Kishon Vijay Abraham I wrote: Hi Felipe, On Monday 18 August 2014 08:10 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:32PM +0530, Kishon Vijay Abraham I wrote: Implemented

Re: [U-Boot] [UBOOT RFC PATCH 13/13] dwc3: core: Change the bounce buffer size to 4096

2014-08-22 Thread Kishon Vijay Abraham I
Hi, On Tuesday 19 August 2014 09:57 PM, Felipe Balbi wrote: On Tue, Aug 19, 2014 at 09:45:11PM +0530, Kishon Vijay Abraham I wrote: Hi, On Monday 18 August 2014 08:11 PM, Felipe Balbi wrote: On Mon, Aug 18, 2014 at 07:58:35PM +0530, Kishon Vijay Abraham I wrote: Bounce buffer is used

[U-Boot] [u-boot 00/40] dra7xx: am43xx: add dwc3 gadget driver support and enable dfu

2015-02-06 Thread Kishon Vijay Abraham I
. *) Make composite driver similar to the one in linux kernel. Pushed these patches to git://git.ti.com/~kishon/ti-u-boot/kishons-ti-u-boot.git dwc3_upstream_v1 Kishon Vijay Abraham I (40): ARM: DRA7: Enable clocks for USB OTGSS and USB PHY ARM: AM43xx: Enable clocks for USB OTGSS and USB PHY usb

[U-Boot] [u-boot 02/40] ARM: AM43xx: Enable clocks for USB OTGSS and USB PHY

2015-02-06 Thread Kishon Vijay Abraham I
Enabled clocks for dwc3 controller and USB PHY present in AM43xx. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 12 +++ arch/arm/include/asm/arch-am33xx/cpu.h | 22 ++-- arch/arm/include/asm

[U-Boot] [u-boot 20/40] include: dwc3-uboot: add a structure for populating platform data

2015-02-06 Thread Kishon Vijay Abraham I
Added a structure to populate dwc3 core platform data. The board file should populate these platform data before invoking dwc3 driver. This will be removed once we have dwc3 driver adapted to use the driver model. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- include/dwc3-uboot.h

[U-Boot] [u-boot 35/40] common: cmd_dfu: invoke board_usb_cleanup() for cleaning up

2015-02-06 Thread Kishon Vijay Abraham I
Invoked board_usb_cleanup for cleaning up initialized USB. It will be invoked if the user enterts ctrl-C. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- common/cmd_dfu.c |1 + common/usb.c |7 +++ 2 files changed, 8 insertions(+) diff --git a/common/cmd_dfu.c b/common

[U-Boot] [u-boot 16/40] include: asm: types: add resource_size_t type

2015-02-06 Thread Kishon Vijay Abraham I
Added resource_size_t type in order to get rid of the following compilation error whiel building dwc3 gadget. include/linux/ioport.h:19:2: error: unknown type name ‘resource_size_t’ Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/include/asm/types.h |1 + 1 file changed, 1

[U-Boot] [u-boot 26/40] usb: dwc3: dwc3-omap: change probe and remove to uboot init and uboot exit code

2015-02-06 Thread Kishon Vijay Abraham I
Removed probe and remove that are specific to linux and replaced it with uboot init and uboot exit. These functions will be invoked from boardfile. This will change once we have dwc3-omap driver adapted to use the uboot driver model. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com

[U-Boot] [u-boot 34/40] usb: gadget: defer setting maxpacket till -setup()

2015-02-06 Thread Kishon Vijay Abraham I
Taken from linux kernel with commit commit 765f5b830e547229bb752e7b232ee83e2b3d49d5 Author: Sebastian Andrzej Siewior bige...@linutronix.de Date: Thu Jun 23 14:26:11 2011 +0200 usb: gadget: defer setting maxpacket till -setup() Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers

[U-Boot] [u-boot 23/40] dwc3: core: added an API to invoke irq handlers

2015-02-06 Thread Kishon Vijay Abraham I
Since interrupt support is not present in u-boot, added an API to handle the interrupts in dwc3 core. This API can be polled to handle the interrupts. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.c | 21 + include/dwc3-uboot.h|1 + 2

[U-Boot] [u-boot 17/40] usb: dwc3: ep0: make dwc3 ep0 build in uboot

2015-02-06 Thread Kishon Vijay Abraham I
*) Changed the included header files to that used in u-boot. *) added dwc3_ep_event_string() used in ep0.c *) Fixed other misc warnings Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.h | 24 drivers/usb/dwc3/ep0.c | 14

[U-Boot] [u-boot 01/40] ARM: DRA7: Enable clocks for USB OTGSS and USB PHY

2015-02-06 Thread Kishon Vijay Abraham I
Enabled clocks for dwc3 controller and USB PHY present in DRA7. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/cpu/armv7/omap5/hw_data.c | 14 ++ arch/arm/cpu/armv7/omap5/prcm-regs.c | 10 +- arch/arm/include/asm/omap_common.h |4 ++-- 3 files

[U-Boot] [u-boot 33/40] usb: dwc3: Makefile: Make dwc3 driver compile in u-boot

2015-02-06 Thread Kishon Vijay Abraham I
Now that the entire dwc3 driver is adapted to compile with uboot build, modify the Makefiles so that the dwc3 driver can be built. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- Makefile|2 ++ drivers/usb/dwc3/Makefile | 35

[U-Boot] [u-boot 28/40] usb: dwc3: dwc3-omap: add interrupt status API to check for interrupts

2015-02-06 Thread Kishon Vijay Abraham I
Added an API to check for interrupt status. This API is generally called from board file to check for interrupt status. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/dwc3-omap.c | 20 include/dwc3-omap-uboot.h|1 + 2 files changed, 21

[U-Boot] [u-boot 31/40] usb: dwc3: ep0: preparation for implementing chained TRB

2015-02-06 Thread Kishon Vijay Abraham I
No functional change. Modified few things so that there are no code duplication while implementing chained TRB. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/ep0.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/usb

[U-Boot] [u-boot 32/40] usb: dwc3: Add chained TRB support for ep0

2015-02-06 Thread Kishon Vijay Abraham I
dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two chained TRBs is required to handle the transfer. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/ep0.c| 72

[U-Boot] [u-boot 38/40] board: ti: AM43xx: added USB initializtion code

2015-02-06 Thread Kishon Vijay Abraham I
Implemented board_usb_init(), board_usb_cleanup() and usb_gadget_handle_interrupts() in am43xx board file that can be invoked by various gadget drivers. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/include/asm/arch-am33xx/hardware_am43xx.h |9 ++ board/ti/am43xx/board.c

[U-Boot] [u-boot 40/40] usb: modify usb_gadget_handle_interrupts to take controller index

2015-02-06 Thread Kishon Vijay Abraham I
index as an argument and made the corresponding changes to all the usb_gadget_handle_interrupts calls. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- board/ti/am43xx/board.c |6 +++--- board/ti/dra7xx/evm.c |6 +++--- common/cmd_dfu.c

[U-Boot] [u-boot 39/40] include: configs: Enable DWC3 and DFU in AM43xx

2015-02-06 Thread Kishon Vijay Abraham I
Enabled dwc3, dwc3-omap and PHY for dwc3 are enabled. Also enabled support for DFU. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- include/configs/am43xx_evm.h | 61 +- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/include

[U-Boot] [u-boot 36/40] board: ti: DRA7: added USB initializtion code

2015-02-06 Thread Kishon Vijay Abraham I
Implemented board_usb_init(), board_usb_cleanup() and usb_gadget_handle_interrupts() in dra7xx board file that can be invoked by various gadget drivers. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/include/asm/arch-omap5/omap.h | 12 board/ti/dra7xx/evm.c

[U-Boot] [u-boot 27/40] dwc3: dwc3-omap: add support for multiple dwc3-omap controllers

2015-02-06 Thread Kishon Vijay Abraham I
Added support for multiple dwc3 omap controllers. This gives uboot the capability to control multiple dwc3 omap controllers. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/dwc3-omap.c | 26 -- include/dwc3-omap-uboot.h|3 ++- 2 files

[U-Boot] [u-boot 30/40] dwc3: flush the buffers before using it

2015-02-06 Thread Kishon Vijay Abraham I
In the linux kernel, non cacheable buffers are used. However in uboot since there are no APIs to allocate non cacheable memory, all the buffers should be flushed before using it. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.c |7 +++ drivers/usb/dwc3

[U-Boot] [u-boot 37/40] include: configs: Enable DWC3 and DFU in DRA7xx

2015-02-06 Thread Kishon Vijay Abraham I
Enabled dwc3, dwc3-omap and PHY for dwc3 are enabled. Also enabled support for DFU. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- include/configs/dra7xx_evm.h | 63 + include/configs/ti_omap5_common.h |5 +++ 2 files changed, 68 insertions

[U-Boot] [u-boot 10/40] usb: dwc3: remove trace_* APIs from dwc3 driver

2015-02-06 Thread Kishon Vijay Abraham I
Removed most of the trace_* APIs from dwc3 driver since tracepoints are not supported in u-boot. Replaced some of the trace_* API with dev_dbg/dev/vdbg. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/Makefile |5 +--- drivers/usb/dwc3/ep0.c| 70

[U-Boot] [u-boot 09/40] usb: dwc3: Modify the file headers to u-boot format

2015-02-06 Thread Kishon Vijay Abraham I
Modified the file header to the format that is used in u-boot. Also included in the header, the commit in linux kernel from which each of these files are added. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.c | 15 +-- drivers/usb/dwc3/core.h

[U-Boot] [u-boot 22/40] dwc3: core: add support for multiple dwc3 controllers

2015-02-06 Thread Kishon Vijay Abraham I
Added support for multiple dwc3 controllers. This gives uboot the capability to control multiple dwc3 controllers. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.c | 32 drivers/usb/dwc3/core.h |4 include/dwc3-uboot.h

[U-Boot] [u-boot 18/40] include: usb: composite: add USB_GADGET_DELAYED_STATUS to avoid compilation error

2015-02-06 Thread Kishon Vijay Abraham I
function drivers to pause control transfers Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- include/linux/usb/composite.h |9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index f833d10..86e1cea 100644 --- a/include

[U-Boot] [u-boot 14/40] usb: dwc3: linux-compat: Add header for dwc3 linux compatibiltiy

2015-02-06 Thread Kishon Vijay Abraham I
Added a header file to include various linux specific APIs like pr_debug, WARN_ WARN_ON_ONCE etc.. in order to avoid compilation error while building dwc3 driver. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/linux-compat.h | 30 ++ 1 file

[U-Boot] [u-boot 25/40] include: dwc3-omap-uboot: add a structure for populating dwc3-omap platform data

2015-02-06 Thread Kishon Vijay Abraham I
Added a structure to populate dwc3 omap platform data. The board file should populate these platform data before invoking dwc3 omap driver. This will be removed once dwc3-omap driver is adapted to use the driver model. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3

[U-Boot] [u-boot 24/40] usb: dwc3: dwc3-omap: make dwc3-omap build in uboot

2015-02-06 Thread Kishon Vijay Abraham I
*) Changed the included header files to that used in u-boot. *) Removed extcon_* APIs *) Removed regulator_* APIs *) Fixed other misc warnings *) Added dwc3-omap.h to include the definitions of UTMI modes. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/dwc3-omap.c

[U-Boot] [u-boot 29/40] usb: dwc3: TI PHY: PHY driver for dwc3 in TI platforms

2015-02-06 Thread Kishon Vijay Abraham I
: phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/ti_usb_phy.c | 309 + include/ti-usb-phy-uboot.h| 22 +++ 2 files changed, 331 insertions(+) create

[U-Boot] [u-boot 06/40] include: asm: dma-mapping: get rid of the compilation warning in udc-core

2015-02-06 Thread Kishon Vijay Abraham I
Fixed the following warning here. warning: ‘dma_alloc_coherent’ defined but not used while compiling udc-core Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/include/asm/dma-mapping.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/dma

[U-Boot] [u-boot 03/40] usb: gadget: udc: add udc-core from linux kernel to u-boot

2015-02-06 Thread Kishon Vijay Abraham I
for multiple gadget controllers to be functional at the same time. All other gadget drivers can also be adapted to use udc-core. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/gadget/udc/Makefile |4 + drivers/usb/gadget/udc/udc-core.c | 637

[U-Boot] [u-boot 11/40] usb: dwc3: fix dwc3 header files

2015-02-06 Thread Kishon Vijay Abraham I
Changed the header files included in core.h and io.h to the u-boot header files so that these files can be included in other dwc3 source files and be compiled in uboot. Also added otg.h which has the defines for dr_mode. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3

[U-Boot] [u-boot 04/40] include: usb: modify gadget.h to include udc support

2015-02-06 Thread Kishon Vijay Abraham I
Made changes in gadget.h that is required after adding udc-core.c except changes that might break other platforms. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- include/linux/usb/gadget.h | 43 +++ 1 file changed, 43 insertions(+) diff --git

[U-Boot] [u-boot 13/40] arm: asm: dma-mapping: added dma_free_coherent API

2015-02-06 Thread Kishon Vijay Abraham I
Added dma_free_coherent corresponding to the dma_alloc_coherent in dma-mapping.h in order to free memory allocated using dma_alloc_coherent. This API is used in dwc3 driver. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/include/asm/dma-mapping.h |7 +++ 1 file changed

[U-Boot] [u-boot 08/40] usb: dwc3: remove un-used files from dwc3 folder

2015-02-06 Thread Kishon Vijay Abraham I
removed un-used/un-supported files from dwc3. These files can be added later as and when the support is added. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/Kconfig | 120 --- drivers/usb/dwc3/debug.c | 32 -- drivers/usb/dwc3/debug.h

[U-Boot] [u-boot 15/40] usb: dwc3: gadget: make dwc3 gadget build in uboot

2015-02-06 Thread Kishon Vijay Abraham I
*) removed irq support and added a function to call these interrupt handler. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/gadget.c | 244 ++- drivers/usb/dwc3/gadget.h |1 + drivers/usb/dwc3/linux-compat.h |3 - include

[U-Boot] [u-boot 12/40] usb: dwc3: remove pm related operations from dwc3 driver

2015-02-06 Thread Kishon Vijay Abraham I
Removed all pm related operations including pm_runtime APIs, suspend/resume hooks as support for these are not present in u-boot. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.c | 96 -- drivers/usb/dwc3/core.h

[U-Boot] [u-boot 05/40] usb: gadget: udc: make udc-core compile in u-boot build

2015-02-06 Thread Kishon Vijay Abraham I
Make udc-core compile in u-boot by removing all linux specific stuff and having only the bare minimal udc-core required for usb gadget drivers. Also modified the file header to a format that is generally being used in u-boot. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb

[U-Boot] [u-boot 21/40] dwc3: core: change probe and remove to uboot init and uboot exit code

2015-02-06 Thread Kishon Vijay Abraham I
Removed probe and remove that are specific to linux and replaced it with uboot init and uboot exit. These functions will be invoked from boardfile. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.c | 218 +++ 1 file

[U-Boot] [u-boot 19/40] usb: dwc3: core: make dwc3 core build in uboot

2015-02-06 Thread Kishon Vijay Abraham I
*) Changed the include header files to that used in u-boot. *) Removed phy_* APIs *) Removed jiffies and used a simple while loop *) Used dma_alloc_coherent and dma_free_coherent APIs of u-boot *) Fixed other misc warnings Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3

Re: [U-Boot] [u-boot 32/40] usb: dwc3: Add chained TRB support for ep0

2015-02-16 Thread Kishon Vijay Abraham I
DWC3_EP0_BOUNCE_SIZE two chained TRBs is required to handle the transfer. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/ep0.c| 72 + drivers/usb/dwc3/gadget.c |2 +- 2 files changed, 55 insertions(+), 19 deletions(-) diff --git

Re: [U-Boot] [u-boot 02/40] ARM: AM43xx: Enable clocks for USB OTGSS and USB PHY

2015-02-20 Thread Kishon Vijay Abraham I
Hi, On Monday 16 February 2015 06:59 PM, Marek Vasut wrote: On Monday, February 16, 2015 at 11:07:39 AM, Lukasz Majewski wrote: Hi Kishon, Enabled clocks for dwc3 controller and USB PHY present in AM43xx. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/cpu/armv7/am33xx

Re: [U-Boot] [u-boot 00/40] dra7xx: am43xx: add dwc3 gadget driver support and enable dfu

2015-02-11 Thread Kishon Vijay Abraham I
Hi, On Saturday 07 February 2015 07:02 PM, Marek Vasut wrote: On Friday, February 06, 2015 at 09:47:37 AM, Kishon Vijay Abraham I wrote: This patch series ports dwc3 gadget driver from linux kernel (3.19-rc1) to u-boot. Changes from RFC: *) A patch has been added to copy the driver from linux

Re: [U-Boot] [u-boot 32/40] usb: dwc3: Add chained TRB support for ep0

2015-02-16 Thread Kishon Vijay Abraham I
-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/ep0.c| 72 + drivers/usb/dwc3/gadget.c |2 +- 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index fce2558..c2fe0ec 100644

Re: [U-Boot] DWC2 driver issues

2015-03-02 Thread Kishon Vijay Abraham I
On Monday 02 March 2015 05:08 PM, Marek Vasut wrote: On Friday, February 20, 2015 at 04:22:58 AM, Stephen Warren wrote: Hi! [...] Existing code that invokes USB transfers will call (a) once. (a) will call (b) as many times as needed to break up the packet into small chunks. (b) will either

[U-Boot] [u-boot PATCH v2 08/40] usb: dwc3: remove un-used files from dwc3 folder

2015-02-23 Thread Kishon Vijay Abraham I
removed un-used/un-supported files from dwc3. These files can be added later as and when the support is added. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/Kconfig | 120 --- drivers/usb/dwc3/debug.c

[U-Boot] [u-boot PATCH v2 10/40] usb: dwc3: remove trace_* APIs from dwc3 driver

2015-02-23 Thread Kishon Vijay Abraham I
Removed most of the trace_* APIs from dwc3 driver since tracepoints are not supported in u-boot. Replaced some of the trace_* API with dev_dbg/dev/vdbg. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Review-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/Makefile |5

[U-Boot] [u-boot PATCH v2 09/40] usb: dwc3: Modify the file headers to u-boot format

2015-02-23 Thread Kishon Vijay Abraham I
Modified the file header to the format that is used in u-boot. Also included in the header, the commit in linux kernel from which each of these files are added. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/core.c

[U-Boot] [u-boot PATCH v2 21/40] dwc3: core: change probe and remove to uboot init and uboot exit code

2015-02-23 Thread Kishon Vijay Abraham I
Removed probe and remove that are specific to linux and replaced it with uboot init and uboot exit. These functions will be invoked from boardfile. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/core.c | 218

[U-Boot] [u-boot PATCH v2 17/40] usb: dwc3: ep0: make dwc3 ep0 build in uboot

2015-02-23 Thread Kishon Vijay Abraham I
*) Changed the included header files to that used in u-boot. *) added dwc3_ep_event_string() used in ep0.c *) Fixed other misc warnings Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/core.h | 24

[U-Boot] [u-boot PATCH v2 23/40] dwc3: core: added an API to invoke irq handlers

2015-02-23 Thread Kishon Vijay Abraham I
Since interrupt support is not present in u-boot, added an API to handle the interrupts in dwc3 core. This API can be polled to handle the interrupts. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/core.c | 21

[U-Boot] [u-boot PATCH v2 05/40] usb: gadget: udc: make udc-core compile in u-boot build

2015-02-23 Thread Kishon Vijay Abraham I
Make udc-core compile in u-boot by removing all linux specific stuff and having only the bare minimal udc-core required for usb gadget drivers. Also modified the file header to a format that is generally being used in u-boot. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz

[U-Boot] [u-boot PATCH v2 31/40] usb: dwc3: ep0: preparation for implementing chained TRB

2015-02-23 Thread Kishon Vijay Abraham I
No functional change. Modified few things so that there are no code duplication while implementing chained TRB. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/ep0.c | 20 1 file changed, 12

Re: [U-Boot] [PATCH 05/11] usb: dwc3: Set usbdrd phy ctrl and mode in dwc3 core

2015-02-23 Thread Kishon Vijay Abraham I
Hi, On Monday 23 February 2015 07:32 PM, Lukasz Majewski wrote: commit message here again. Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com Signed-off-by: Lukasz Majewski l.majew...@samsung.com [The code has been rebased on v2 dwc3 support provided by Kishon Vijay Abraham I

[U-Boot] [u-boot PATCH v2 03/40] usb: gadget: udc: add udc-core from linux kernel to u-boot

2015-02-23 Thread Kishon Vijay Abraham I
for multiple gadget controllers to be functional at the same time. All other gadget drivers can also be adapted to use udc-core. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/gadget/udc/Makefile |4 + drivers/usb/gadget/udc/udc

[U-Boot] [u-boot PATCH v2 00/40] dra7xx: am43xx: add dwc3 gadget driver support and enable dfu

2015-02-23 Thread Kishon Vijay Abraham I
and am43xx TODO: *) Add Kconfig support *) Adapt dwc3 driver to use the driver model. *) Make composite driver similar to the one in linux kernel. Pushed these patches to git://git.ti.com/~kishon/ti-u-boot/kishons-ti-u-boot.git dwc3_upstream_v2 Kishon Vijay Abraham I (40): ARM: DRA7: Enable clocks

[U-Boot] [u-boot PATCH v2 12/40] usb: dwc3: remove pm related operations from dwc3 driver

2015-02-23 Thread Kishon Vijay Abraham I
Removed all pm related operations including pm_runtime APIs, suspend/resume hooks as support for these are not present in u-boot. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/core.c | 96

[U-Boot] [u-boot PATCH v2 02/40] ARM: AM43xx: Enable clocks for USB OTGSS and USB PHY

2015-02-23 Thread Kishon Vijay Abraham I
Enabled clocks for dwc3 controller and USB PHY present in AM43xx. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 12 arch/arm/include/asm/arch-am33xx/cpu.h

[U-Boot] [u-boot PATCH v2 06/40] include: asm: dma-mapping: get rid of the compilation warning in udc-core

2015-02-23 Thread Kishon Vijay Abraham I
Fixed the following warning here. warning: ‘dma_alloc_coherent’ defined but not used while compiling udc-core Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- arch/arm/include/asm/dma-mapping.h |2 +- 1 file changed, 1 insertion

[U-Boot] [u-boot PATCH v2 11/40] usb: dwc3: fix dwc3 header files

2015-02-23 Thread Kishon Vijay Abraham I
Changed the header files included in core.h and io.h to the u-boot header files so that these files can be included in other dwc3 source files and be compiled in uboot. Also added otg.h which has the defines for dr_mode. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz

[U-Boot] [u-boot PATCH v2 16/40] include: asm: types: add resource_size_t type

2015-02-23 Thread Kishon Vijay Abraham I
Added resource_size_t type in order to get rid of the following compilation error whiel building dwc3 gadget. include/linux/ioport.h:19:2: error: unknown type name ‘resource_size_t’ Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- arch

[U-Boot] [u-boot PATCH v2 18/40] include: usb: composite: add USB_GADGET_DELAYED_STATUS to avoid compilation error

2015-02-23 Thread Kishon Vijay Abraham I
function drivers to pause control transfers Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- include/linux/usb/composite.h |9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/usb/composite.h b/include/linux/usb

[U-Boot] [u-boot PATCH v2 40/40] usb: modify usb_gadget_handle_interrupts to take controller index

2015-02-23 Thread Kishon Vijay Abraham I
index as an argument and made the corresponding changes to all the usb_gadget_handle_interrupts calls. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- board/ti/am43xx/board.c |6 +++--- board/ti/dra7xx/evm.c

[U-Boot] [u-boot PATCH v2 32/40] usb: dwc3: Add chained TRB support for ep0

2015-02-23 Thread Kishon Vijay Abraham I
dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two chained TRBs is required to handle the transfer. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com

[U-Boot] [u-boot PATCH v2 27/40] dwc3: dwc3-omap: add support for multiple dwc3-omap controllers

2015-02-23 Thread Kishon Vijay Abraham I
Added support for multiple dwc3 omap controllers. This gives uboot the capability to control multiple dwc3 omap controllers. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/dwc3-omap.c | 26

Re: [U-Boot] [PATCH 06/11] usb: dwc3: add a workaround for too small OUT requests

2015-02-23 Thread Kishon Vijay Abraham I
Hi, On Monday 23 February 2015 07:32 PM, Lukasz Majewski wrote: From: Marek Szyprowski m.szyprow...@samsung.com DWC3 hangs on OUT requests smaller than maxpacket size, so HACK the request length to be at least equal to maxpacket size. Curious to know using which gadget this issue was seen.

[U-Boot] [u-boot PATCH v2 01/40] ARM: DRA7: Enable clocks for USB OTGSS and USB PHY

2015-02-23 Thread Kishon Vijay Abraham I
Enabled clocks for dwc3 controller and USB PHY present in DRA7. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- arch/arm/cpu/armv7/omap5/hw_data.c | 14 ++ arch/arm/cpu/armv7/omap5/prcm-regs.c | 10 +- arch/arm

[U-Boot] [u-boot PATCH v2 36/40] board: ti: DRA7: added USB initializtion code

2015-02-23 Thread Kishon Vijay Abraham I
Implemented board_usb_init(), board_usb_cleanup() and usb_gadget_handle_interrupts() in dra7xx board file that can be invoked by various gadget drivers. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- arch/arm/include/asm/arch-omap5

[U-Boot] [u-boot PATCH v2 39/40] include: configs: Enable DWC3 and DFU in AM43xx

2015-02-23 Thread Kishon Vijay Abraham I
Enabled dwc3, dwc3-omap and PHY for dwc3 are enabled. Also enabled support for DFU. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- include/configs/am43xx_evm.h | 58 +- 1 file changed, 57

[U-Boot] [u-boot PATCH v2 29/40] usb: dwc3: TI PHY: PHY driver for dwc3 in TI platforms

2015-02-23 Thread Kishon Vijay Abraham I
: phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- drivers/usb/dwc3/ti_usb_phy.c | 309 + include/ti-usb-phy-uboot.h

[U-Boot] [u-boot PATCH v2 25/40] include: dwc3-omap-uboot: add a structure for populating dwc3-omap platform data

2015-02-23 Thread Kishon Vijay Abraham I
Added a structure to populate dwc3 omap platform data. The board file should populate these platform data before invoking dwc3 omap driver. This will be removed once dwc3-omap driver is adapted to use the driver model. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz

[U-Boot] [u-boot PATCH v2 33/40] usb: dwc3: Makefile: Make dwc3 driver compile in u-boot

2015-02-23 Thread Kishon Vijay Abraham I
Now that the entire dwc3 driver is adapted to compile with uboot build, modify the Makefiles so that the dwc3 driver can be built. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- Makefile|2 ++ drivers/usb

[U-Boot] [u-boot PATCH v2 35/40] common: cmd_dfu: invoke board_usb_cleanup() for cleaning up

2015-02-23 Thread Kishon Vijay Abraham I
Invoked board_usb_cleanup for cleaning up initialized USB. It will be invoked if the user enterts ctrl-C. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Lukasz Majewski l.majew...@samsung.com --- common/cmd_dfu.c |1 + common/usb.c |6 ++ 2 files changed, 7

  1   2   3   4   >