- 31 7月, 2015 9 次提交
-
-
由 Robert Baldyga 提交于
Due to some UDC controllers may not support zlp, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_zlp_not_supp' field to struct usb_gadget and helper function gadget_is_zlp_supported(). It also sets 'quirk_zlp_not_supp' to 1 in musb UDC driver, which has such limitation. [ balbi@ti.com : make it build ] Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Due to some UDC controllers may not support stalling, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_stall_not_supp' field to struct usb_gadget and helper function gadget_is_stall_supported(). It also sets 'quirk_stall_not_supp' to 1 in at91_udc driver, which has such limitation. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Due to some UDC controllers may not support altsettings, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_altset_not_supp' field to struct usb_gadget and helper function gadget_is_altset_supported(). It also sets 'quirk_altset_not_supp' to 1 in pxa25x_udc and pxa27x_udc drivers, which have such limitation. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
Use chained TRB mechanism to handle non maxpacket aligned transfers greater than bounce buffer size. With this the first TRB will be programmed to receive 'ALIGN(ur->length - maxp, maxp)' data and the second TRB will be programmed to receive the remaining data using bounce buffer. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
Add chained TRB support to ep0. Now TRB's can be chained just by invoking _dwc3_ep0_start_trans_ with 'chain' parameter set to true. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
No functional change. Added a new parameter in _dwc3_ep0_start_trans_ to indicate whether the TRB is a chained TRB or last TRB. This is in preparation for adding chained TRB support for ep0. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
No functional change. This is in preparation for handling non maxpacket aligned transfers greater than bounce buffer size. This is basically to avoid code duplication when using chained TRB transfers to handle non maxpacket aligned transfers greater than bounce buffer size. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
No functional change. Used _roundup_ macro to calculate the transfer size aligned to maxpacket in dwc3_ep0_complete_data. It also makes it similar to how transfer size is calculated in __dwc3_ep0_do_control_data. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and the size of bounce buffer is 512 bytes. However if the host initiates OUT transfers of size more than 512 bytes (and non max packet aligned), the driver throws a WARN dump but still programs the TRB to receive more than 512 bytes. This will cause bounce buffer to overflow and corrupt the adjacent memory locations which can be fatal. Fix it by programming the TRB to receive a maximum of DWC3_EP0_BOUNCE_SIZE (512) bytes. Cc: <stable@vger.kernel.org> # 3.4+ Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 7月, 2015 31 次提交
-
-
由 Phil Edworthy 提交于
These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NPhil Edworthy <phil.edworthy@renesas.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while ether unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Allocate usb otg descriptor and initialize it according to gadget's otg capabilities, if usb_otg_caps is not set, keep settings as current gadget drivers. With this 2 new interfaces, gadget can use usb_otg_descriptor for OTG 1.x, and usb_otg20_descriptor for OTG 2.0 or above, and otg features can be decided by the combination of usb hardware property and driver config. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
After introduce usb otg properties, update ci_otg_is_fsm_mode conditions to be depending on both usb hardware properties and usb driver config, also resolve a compile issue in debug.c after the API change. Acked-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Acked-by: NPeter Chen <peter.chen@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Check property of usb hardware to update otg version and disable SRP, HNP and ADP if its disable flag is present. Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
Add otg version, srp, hnp and adp support for usb OTG port, then those OTG features don't have to be decided by usb gadget drivers. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Macpaul Lin 提交于
Copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: NMacpaul Lin <macpaul@gmail.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Macpaul Lin 提交于
Add usb_otg_caps pointer to usb_gadget structure to indicate its otg capabilities. Signed-off-by: NMacpaul Lin <macpaul@gmail.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
This patch adds a structure usb_otg_caps to cover all otg related capabilities of the device, including otg revision, and if hnp/srp/adp is supported. Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Macpaul Lin 提交于
Add USB_OTG_ADP definition for usb_otg_descriptor.bmAttributes. Signed-off-by: NMacpaul Lin <macpaul@gmail.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Acked-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Macpaul Lin 提交于
OTG 2.0 introduces bcdOTG in otg descriptor to identify the OTG and EH supplement release number with which the OTG device is compliant, this patch adds structure usb_otg20_descriptor for OTG 2.0 and above. Signed-off-by: NMacpaul Lin <macpaul@gmail.com> Signed-off-by: NLi Jun <jun.li@freescale.com> Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Hans de Goede 提交于
The A33 SoC uses the same musb controller as found on the A31 and later, but allwinner has removed the configdata register, this commit adds special handling for this. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Hans de Goede 提交于
The A31 SoC uses the same musb controller as found in earlier SoCs, but it is hooked up slightly different. Its SRAM is private and no longer controlled through the SRAM controller, and its reset is controlled via a separate reset controller. This commit adds support for this setup. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Hans de Goede 提交于
This is based on initial code to get the Allwinner sunxi musb controller supported by Chen-Yu Tsai and Roman Byshko. This adds support for the Allwinner sunxi musb controller in both host only and otg mode. Peripheral only mode is not supported, as no boards use that. This has been tested on a cubietruck (A20 SoC) and an UTOO P66 tablet (A13 SoC) with a variety of devices in host mode and with the g_serial gadget driver in peripheral mode, plugging otg / host cables in/out a lot of times in all possible imaginable plug orders. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Use bind_deactivated flag instead of calling usb_function_deactivate() in function bind(). Field 'can_activate' in struct f_obex is no longer needed as setting 'bind_deactivated' flag makes us sure, that the function will be binded only if deactivation can be performed successfully. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Use bind_deactivated flag instead of calling usb_function_deactivate() in function bind(). Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
This patch introduces 'bind_deactivated' flag in struct usb_function. Functions which don't want to be activated automatically after bind should set this flag, and when they start to be ready to work they should call usb_function_activate(). When USB function sets 'bind_deactivated' flag, initial deactivation counter is incremented automatically, so there is no need to call usb_function_deactivate() in function bind. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Using usb_gadget_disconnect to make gadget temporarily invisible to host doesn't provide desired result, because gadget is connected immediately after binding regardless to previous usb_gadget_disconnect() calls. For this reason we use usb_gadget_deactivate() instead of usb_gadget_disconnect() to make it working as expected. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-