- 29 7月, 2013 6 次提交
-
-
由 Felipe Balbi 提交于
no functional changes, just grouping dep initialization. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
by moving that dev_vdbg() to the internal __dwc3_gadget_ep_enable() we get the print even when enable ep0, which calls the internal function directly. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
Recent versions of the core, can suspend and resume the PHYs automatically, so we don't need to fiddle with dwc3's Global PHY registers at all. On versions prior to 1.94a this patch will mean that we will never ask dwc3 to suspend the PHY. This is an acceptable behavior or such old versions of the core, specially considering that the only chip known to have a version prior to 1.94a was OMAP5 ES1.0 and that's not supported in mainline kernel, because it was just a test spin of OMAP5. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
in order to allow different instances of the core work in different maximum speeds, we will move the maximum_speed module_parameter to both DeviceTree (making use the new maximum-speed DT property) and platform_data. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
This is a Linux-only driver which makes use of GPL-only symbols. It makes no sense to maintain Dual BSD/GPL licensing for this driver. Considering that the amount of work to use this driver in any different operating system would likely be as large as developing the driver from scratch and considering that we depend on GPL-only symbols, we will switch over to a GPL v2-only license. Cc: Anton Tikhomirov <av.tikhomirov@samsung.com> Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
We cannot request an IRQ with spinlocks held as that would trigger a sleeping inside spinlock warning. Cc: <stable@vger.kernel.org> # v3.10 Reported-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 15 7月, 2013 1 次提交
-
-
由 Felipe Balbi 提交于
In case we fail our ->udc_start() callback, we should be ready to accept another modprobe following the failed one. We had forgotten to clear dwc->gadget_driver back to NULL and, because of that, we were preventing gadget driver modprobe from being retried. Cc: <stable@vger.kernel.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 5月, 2013 1 次提交
-
-
由 George Cherian 提交于
we never allocate a TRB pool for physical endpoints 0 and 1 so trying to free it (a invalid TRB pool pointer) will lead us in a warning while removing dwc3.ko module. In order to fix the situation, all we have to do is skip dwc3_free_trb_pool() for physical endpoints 0 and 1 just as we while deleting endpoints from the endpoints list. Cc: stable@vger.kernel.org Signed-off-by: NGeorge Cherian <george.cherian@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 18 3月, 2013 12 次提交
-
-
由 Felipe Balbi 提交于
that way we will only tell gadget framework about the endpoints we actually have. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
In DWC3 versions < 2.50a configured without Hibernation mode enabled, there will be an extra link status change interrupt if device detects host-initiated U3 exit. In that case, core will generate an unnecessary U3 -> RESUME transition which should be ignored by the driver. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
udc-core provides a better way to handle release methods, let's use it. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
udc-core now handles that for us, which means we can remove it from our driver. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
udc-core now sets dma-related and parent fields for us, we don't need to do it ourselves. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
make use of the previously introduced gadget->state field. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
by moving to threaded IRQs, we allow our IRQ priorities to be configurable when running with realtime patch. Also, since we're running in thread context, we can call functions which might sleep, such as sysfs_notify() without problems. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
Add support for basic power management on the dwc3 driver. While there is still lots to improve for full PM support, this minimal patch will already make sure that we survive suspend-to-ram and suspend-to-disk without major issues. Cc: Vikas C Sajjan <vikas.sajjan@linaro.org> Tested-by: NVivek Gautam <gautam.vivek@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
This will be used during resume to verify if we should reconnect our pullups or not. Tested-by: NVivek Gautam <gautam.vivek@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
we don't need to enable IRQs until we have a gadget driver loaded and ready to work, so let's delay IRQ enable to ->udc_start() and IRQ disable to ->udc_stop(). While at that, also move the related use of request_irq() and free_irq(). Tested-by: NVivek Gautam <gautam.vivek@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
We don't need the ->register_my_device flag anymore because all UDC drivers have been properly converted. Let's remove every history of it. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
We don't need to register that device ourselves if we simply set gadget->register_my_device. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 04 3月, 2013 1 次提交
-
-
由 Felipe Balbi 提交于
the params variables on dwc3_gadget_conndone_interrupt() is only memset() to zero but never used in that function, so we can safely drop the variable and memset() call. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 24 1月, 2013 1 次提交
-
-
由 Felipe Balbi 提交于
First of all, that 28 value makes no sense as HIRD threshold is a 4-bit value, second of all it's causing issues for OMAP5. Using 12 because commit cbc725b3 (usb: dwc3: keep default hird threshold value as 4b1100) had the intention of setting the maximum allowed value of 0xc. Also, original code has been wrong forever, so this should be backported as far back as possible. Cc: <stable@vger.kernel.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 18 1月, 2013 10 次提交
-
-
由 Pratyush Anand 提交于
I am not sure, why I found it during SG debugging. But, I noticed that even when req_queued list was empty, there were some request in request_list having queued flag true. If I run test second time, it first removes all request from request_list and hence busy_slot was wrongly incremented. Cc: <stable@vger.kernel.org> Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
To work with scatter gather properly, fixes have been done in number of functions. I will explain requirement of each fixes one by one. start_slot: used to retrieve all request of SG during cleanup dwc3_gadget_giveback: We need to skip link TRB if it was one of the intermediate TRB of SG. dwc3_prepare_one_trb: We need to track all submitted TRBs during cleanup. Since, all TRBs would be serially allocated, so we can just keep starting slot info and we can always find rest of them. We need to pass sg node number, so that we cab appropriately program ISOC_FIRST/ISOC, Chain etc. dwc3_prepare_trbs: last_one should be set when it is last node of SG as well as last node of request_list. __dwc3_cleanup_done_trbs: It has been prepared after re-factorization of dwc3_cleanup_done_reqs. It is called for each TRB of SG. Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
UPDATE_TRANSFER does not need any parameters. So, no need to prepare it. Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
When we reach to link trb, we just need to increase free_slot and then calculate TRB. Return is not correct, as it will cause wrong TRB DMA address to fetch in case of update transfer. Cc: <stable@vger.kernel.org> Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
There were still some corner cases where isoc transfer was not able to restart, specially when missed isoc does not happen , and in fact gadget does not queue any new request during giveback. Cleanup function calls giveback first, which provides a way to queue another request to gadget. But gadget did not had any data. So , it did not call ep_queue. To twist it further, gadget did not queue till cleanup for last queued TRB is called. If we ever reach this scenario, we must call END TRANSFER, so that we receive a new xfernotready with information about current microframe number. Also insure that there is no request submitted to core when issuing END TRANSFER. Cc: <stable@vger.kernel.org> # v3.8 Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
Its better to return from each if condition as they are mutually exclusive. Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
There are two reasons to generate missed isoc. 1. when the host does not poll for all the data. 2. because of application-side delays that prevent all the data from being transferred in programmed microframe. Current code was able to handle first case only. This patch handles scenario 2 as well.Scenario 2 sometime may occur with complex gadget application, however it can be easily reproduced for testing purpose as follows: a. use isoc binterval as 1 in f_sourcesink. b. use pattern=0 c. introduce a delay of 150us deliberately in source_sink_complete, so that after few frames it lands into scenario 2. d. now run testusb 16 (isoc in test). You will notice that if this patch is not applied then isoc transfer is not able to recover after first missed. Current patch's approach is as under: If missed isoc occurs and there is no request queued then issue END TRANSFER, so that core generates next xfernotready and we will issue a fresh START TRANSFER. If there are still queued request then wait, do not issue either END or UPDATE TRANSFER, just attach next request in request_list during giveback. If any future queued request is successfully transferred then we will issue UPDATE TRANSFER for all request in the request_list. Cc: <stable@vger.kernel.org> # v3.6 v3.7 v3.8 Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
Synopsys says: The HIRD Threshold field must be set to ‘0’ when the device core is operating in super speed mode. This patch implements above statement. Cc: <stable@vger.kernel.org> # v3.6 v3.7 v3.8 Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
dwc3_gadget_set_ep_config expects maxburst as incremented by 1. So, by default initialize ep->maxburst to 1 for ep0. Cc: <stable@vger.kernel.org> Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
we have an extra 'ret' variable shadowing a previous definition. Remove it. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 22 11月, 2012 1 次提交
-
-
由 Bill Pemberton 提交于
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: NBill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: NFelipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Cc: Geoff Levand <geoff@infradead.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 10月, 2012 1 次提交
-
-
由 Felipe Balbi 提交于
If a USB transfer has already been started, meaning we have already issued StartTransfer command to that particular endpoint, DWC3_EP_BUSY flag has also already been set. When we try to cancel this transfer which is already in controller's cache, we will not receive XferComplete event and we must clear DWC3_EP_BUSY in order to allow subsequent requests to be properly started. The best place to clear that flag is right after issuing DWC3_DEPCMD_ENDTRANSFER. Cc: stable@vger.kernel.org # v3.4 v3.5 v3.6 Reported-by: NMoiz Sonasath <m-sonasath@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 07 9月, 2012 2 次提交
-
-
由 Pratyush Anand 提交于
If xfernotready is received and there is no request in request_list then REQUEST_PENDING flag must be set, so that next request in ep queue is executed. In case of isoc transfer, if xfernotready is already elapsed and even first request has not been queued to request_list, then issue END TRANSFER, so that you can receive xfernotready again and can have notion of current microframe. Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Pratyush Anand 提交于
In case of ep0 out, if length is not aligned to maxpacket size then we use dwc->ep_bounce_addr for dma transfer and not request->dma. Since, we have alreday done memcpy from dwc->ep0_bounce to request->buf, so we do not need to issue cache sync function. In fact, cache sync function will bring wrong data in request->buf from request->dma in this scenario. So, cache sync function must not be executed in case of ep0 bounced. Cc: <stable@vger.kernel.org> # v3.4 v3.5 Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 31 8月, 2012 1 次提交
-
-
由 Chanho Park 提交于
When connection is established non-ss mode, endpoint.maxburst is correctly set to 0, this means that current code will set maxburst bitfield on DEPCFG's parameter 0 to the highest possible value (0x0f) which is wrong. Even though this hasn't caused any issues so far (HW seems to ignore that when not running in SS mode) we want to make sure maxburst bitfield is only set to anything other than zero if we're running on SuperSpeed mode. In order to achieve that, let's check for gadget's operating speed before setting maxburst bitfield when issuing DEPCFG command. [ balbi@ti.com : improved commit log a bit in order to clarify the situation ] Signed-off-by: NChanho Park <chanho61.park@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 15 8月, 2012 1 次提交
-
-
由 Felipe Balbi 提交于
In case some gadget driver tries to enable an endpoint which is already enabled, we print a nice WARN so we can track broken gadget drivers. The only problem is that we're printing the WARN when we already changed endpoint's name, which would result in endpoints named as: ep1in-bulk-bulk-bulk-bulk-bulk-bulk-bulk To prevent that, we will continue to print the WARN, but do so before changing endpoint's name and return early. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 09 8月, 2012 1 次提交
-
-
由 Pratyush Anand 提交于
dwc3_stop_active_transfer has been called from two places. After each calling of this function , we should allow 100 us delay to synchronize with interconnect. It would be better if we put this delay in that function only, rather than into calling routine of this function. Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Reported-by: NMichel Sanches <michel.sanches@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 07 8月, 2012 1 次提交
-
-
由 Pratyush Anand 提交于
When MISSED_ISOC is set, BUSY is also set. Since, we are handling MISSED_ISOC as a separate case in third scenario, therefore handle only BUSY but not MISSED_ISOC in second scenario. Signed-off-by: NPratyush Anand <pratyush.anand@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-