- 04 11月, 2017 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NFelipe Balbi <felipe.balbi@linux.intel.com> Acked-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 11 4月, 2017 1 次提交
-
-
由 Philipp Zabel 提交于
As of commit bb475230 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 26 1月, 2017 1 次提交
-
-
由 Heiner Kallweit 提交于
The irq is available in hsotg already, so there's no need to pass it as separate function parameter. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 24 1月, 2017 2 次提交
-
-
由 John Youn 提交于
* Remove braces for one-line statements * Add missing braces where another arm in if-statement uses braces Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
This commmit is the result of running checkpatch --fix. The results were verified for correctness. Some of the fixes result in line over 80 char which we will fix manually later. The following is a summary of what was done by checkpatch: * Remove externs on function prototypes. * Replace symbolic permissions with octal. * Align code to open parens. * Replace 'unsigned' with 'unsigned int'. * Remove unneccessary blank lines. * Add blank lines after declarations. * Add spaces around operators. * Remove unnecessary spaces after casts. * Replace 'x == NULL' with '!x'. * Replace kzalloc() with kcalloc(). * Concatenate multi-line strings. * Use the BIT() macro. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 18 11月, 2016 4 次提交
-
-
由 John Youn 提交于
Replace this by statically defining a function with defaults, and just assigning it. This will allow us to use parameters of any type and any default value. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
Consolidate and move all the parameter initialization code from the probe function to params.c. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
This makes it consistent with the hw_params struct and simplifies the memory management for future refactoring. Fix up usage in all files. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
Add a params.c file and move all driver parameter code there, including all the static parameter definitions. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 15 9月, 2016 1 次提交
-
-
由 Jerome Brunet 提交于
Add compatible strings for amlogic Meson8b and GXBB SoCs with the corresponding configuration parameters. Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NKevin Hilman <khilman@baylibre.com>
-
- 22 8月, 2016 1 次提交
-
-
由 Dinh Nguyen 提交于
Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: NDinh Nguyen <dinguyen@opensource.altera.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 28 4月, 2016 1 次提交
-
-
由 John Youn 提交于
Cleanup in probe if we fail to get dr_mode. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 04 3月, 2016 3 次提交
-
-
由 Antti Seppälä 提交于
Add support for Lantiq ARX and XRX SoC families to the dwc2 driver. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NAntti Seppälä <a.seppala@gmail.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Douglas Anderson 提交于
As documented in dwc2_calculate_dynamic_fifo(), host_rx_fifo_size should really be: 2 * ((Largest Packet size / 4) + 1 + 1) + n with n = number of host channel. We have 9 host channels, so 2 * ((1024/4) + 2) + 9 = 516 + 9 = 525 We've got 960 / 972 total_fifo_size on rk3288 (and presumably on rk3066) and 525 + 128 + 256 = 909 so we're still under on both ports even when we increment by 5. In the future, it would be nice if dwc2_calculate_dynamic_fifo() could handle the "too small" FIFO case and come up with something more dynamically. When we do that we can figure out how to allocate the extra 48 / 60 bytes of FIFO that we're currently wasting. NOTE: no known bugs are fixed by this patch, but it seems like a simple fix and ought to fix someone. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NKever Yang <kever.yang@rock-chips.com> Tested-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Douglas Anderson 提交于
Previously we needed to set the max_transfer_size to explicitly be 65535 because the old driver would detect that our hardware could support much bigger transfers and then would try to do them. This wouldn't work since the DMA alignment code couldn't support it. Later in commit e8f8c14d ("usb: dwc2: clip max_transfer_size to 65535") upstream added support for clipping this automatically. Since that commit it has been OK to just use "-1" (default), but nobody bothered to change it. Let's change it to default now for two reasons: - It's nice to use autodetected params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: NDouglas Anderson <dianders@chromium.org> Acked-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 04 2月, 2016 1 次提交
-
-
由 John Youn 提交于
This reverts commit 263b7fb5 ("usb: dwc2: Move reset into dwc2_get_hwparams()") due to regression found on bcm2835 platform. USB ethernet fails, due to being unable to pick up proper parameters when performing a plain reset before reading hw params. Below shows the results of the gnptxfsiz and hptxfsiz with and before and after reverting this (from Stefan Wahren): So here is the probe result before Patch 1 is applied: [ 1.283148] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host [ 1.313894] dwc2 20980000.usb: gnptxfsiz=00201000 [ 1.314104] dwc2 20980000.usb: hptxfsiz=00000000 [ 1.353908] dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size. Check HW configuration. [ 1.354262] dwc2 20980000.usb: 512 invalid for host_perio_tx_fifo_size. Check HW configuration. [ 1.394249] dwc2 20980000.usb: DWC OTG Controller [ 1.394561] dwc2 20980000.usb: new USB bus registered, assigned bus number 1 [ 1.394917] dwc2 20980000.usb: irq 33, io mem 0x00000000 And here is the probe result after Patch 1 is applied: [ 1.280107] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host [ 1.353949] dwc2 20980000.usb: gnptxfsiz=01001000 [ 1.354166] dwc2 20980000.usb: hptxfsiz=02002000 [ 1.434301] dwc2 20980000.usb: DWC OTG Controller [ 1.434616] dwc2 20980000.usb: new USB bus registered, assigned bus number 1 [ 1.434973] dwc2 20980000.usb: irq 33, io mem 0x00000000 Tested-by: NHeiko Stuebner <heiko@sntech.de> Tested-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Reported-by: NStefan Wahren <stefan.wahren@i2se.com> Reported-by: NRemi Pommarel <repk@triplefau.lt> Tested-by: NStefan Wahren <stefan.wahren@i2se.com> Tested-by: NRemi Pommarel <repk@triplefau.lt> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 23 12月, 2015 6 次提交
-
-
由 Heiko Stübner 提交于
In specific conditions (involving usb hubs) dwc2 devices can create a lot of interrupts, even to the point of overwhelming devices running at low frequencies. Some devices need to do special clock handling at shutdown-time which may bring the system clock below the threshold of being able to handle the dwc2 interrupts. Disabling dwc2-irqs in a shutdown callbacks prevents reboots/poweroffs from getting stuck in such cases. The hsotg struct already contains an unused irq element, so we can just use it to store the irq number for the shutdown callback. Reviewed-by: NDouglas Anderson <dianders@chromium.org> Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NHeiko Stuebner <heiko.stuebner@collabora.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 John Youn 提交于
Reset already happens before this so just force the dr_mode. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 John Youn 提交于
The reset is required to get reset values of the hardware parameters but the force mode is not. Move the base reset into dwc2_get_hwparams() and do the reset and force mode afterwards. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 John Youn 提交于
The dr_mode parameter was being checked against how the dwc2 module was being configured at compile time. But it wasn't checked against the hardware capabilities, nor were the hardware capabilities checked against the compilation parameters. This commit adds those checks and adjusts dr_mode to an appropriate value, if needed. If the hardware capabilities and module compilation do not match then we fail as it wouldn't be possible to run properly. The hardware, module, and dr_mode, can each be set to host, device, or otg. Check that all these values are compatible and adjust the value of dr_mode if possible. The following table summarizes the behavior: actual HW MOD dr_mode dr_mode ------------------------------ HST HST any : HST HST DEV any : --- HST OTG any : HST DEV HST any : --- DEV DEV any : DEV DEV OTG any : DEV OTG HST any : HST OTG DEV any : DEV OTG OTG any : dr_mode Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 John Youn 提交于
Renamed dwc2_core_reset() to dwc2_core_reset_and_force_dr_mode(). This describes what it is doing more accurately. This is in preparation of introducing a plain dwc2_core_reset() function that only performs the reset and doesn't force the mode. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Yunzhi Li 提交于
We initiate dwc2 usb controller in BIOS, dwc2_core_reset() should be called before dwc2_get_hwparams() to reset core registers to default value. Without this the FIFO setting might be incorrect because calculating FIFO size need power-on value of GRXFSIZ/GNPTXFSIZ/HPTXFSIZ registers. This patch could avoid warnning massage like in rk3288 platform: [ 2.074764] dwc2 ff580000.usb: 256 invalid for host_perio_tx_fifo_size. Check HW configuration. Signed-off-by: NYunzhi Li <lyz@rock-chips.com> Signed-off-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 15 12月, 2015 2 次提交
-
-
由 Zhangfei Gao 提交于
Support hisilicon,hi6220-usb for HiKey board Acked-by: NRob Herring <robh@kernel.org> Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
As descriptor dma mode does not support split transfers, it can't be enabled for high speed devices. Add a core parameter to enable it for full speed devices. Ensure frame list and descriptor list are correctly freed during disconnect. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 20 11月, 2015 4 次提交
-
-
由 Stefan Wahren 提交于
This patch make sure that all necessary members of dwc2_hsotg are initialized before the irq handler is requested. So the kernel oops triggered by dwc2_handle_common_intr has been fixed. dwc2 20980000.usb: Configuration mismatch. Forcing host mode dwc2 20980000.usb: no platform data or transceiver defined Unable to handle kernel paging request at virtual address cc860040 pgd = c0004000 [cc860040] *pgd=0b41e811, *pte=00000000, *ppte=00000000 Internal error: Oops: 7 [#1] ARM CPU: 0 PID: 1 Comm: swapper Not tainted 4.3.0-rc3+ #19 Hardware name: BCM2835 task: cb494000 ti: cb4d0000 task.ti: cb4d0000 PC is at dwc2_is_controller_alive+0x18/0x34 LR is at dwc2_handle_common_intr+0x24/0xb60 Acked-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Stefan Wahren 提交于
Fixes commit 09a75e85 ("usb: dwc2: refactor common low-level hw code to platform.c") The above commit consolidated the low-level phy access into a common location. This change made the otg clk a requirement and broke some platforms when it was moved into platform.c. So make clk handling optional again. Acked-by: NEric Anholt <eric@anholt.net> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Fixes: 09a75e85 ("usb: dwc2: refactor common low-level hw code to platform.c") Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Stefan Wahren 提交于
When searching for PHYs, any error was treated as if the PHY did not exist or was not specified. Thus the probe function did not correctly return error conditions such as -EPROBE_DEFER. Fixed so that only a non-existing PHY is ignored and any other error is returned. Acked-by: NEric Anholt <eric@anholt.net> Reported-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 John Youn 提交于
Fixes commit 09a75e85 ("usb: dwc2: refactor common low-level hw code to platform.c") The above commit consolidated the low-level phy access into a common location. This change introduced a check from the gadget requiring that a PHY is specified. This requirement never existed on the host side and broke some platforms when it was moved into platform.c. The gadget doesn't require the PHY either so remove the check. Acked-by: NEric Anholt <eric@anholt.net> Reported-by: NStefan Wahren <info@lategoodbye.de> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Fixes: 09a75e85 ("usb: dwc2: refactor common low-level hw code to platform.c") Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 18 11月, 2015 1 次提交
-
-
由 Douglas Anderson 提交于
The comment for ahbcfg for rk3066 parameters (also used for rk3288) claimed that ahbcfg was INCR16, but it wasn't. Since the bits weren't shifted properly, the 0x7 ended up being masked and we ended up programming 0x3 for the HBstLen. Let's set it to INCR16 properly. As per Wu Liang Feng at Rockchip this may increase transmission efficiency. I did blackbox tests with writing 0s to a USB-based SD reader (forcefully capping CPU Freq to try to measure efficiency): cd /sys/devices/system/cpu/cpu0/cpufreq echo userspace > scaling_governor echo 126000 > scaling_setspeed for i in $(seq 10); do dd if=/dev/zero of=/dev/sdb bs=1M count=750 done With the above tests I found that speeds went from ~15MB/s to ~18MB/s. Note that most other tests I did (including reading from the same USB reader) didn't show any difference in performance. Tested-by: NHeiko Stuebner <heiko@sntech.de> Acked-by: NJohn Youn <johnyoun@synopsys.com> Reviewed-by: NLiangfeng Wu <wulf@rock-chips.com> Signed-off-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 14 10月, 2015 2 次提交
-
-
由 Marek Szyprowski 提交于
DWC2 module on some platforms needs three additional hardware resources: phy controller, clock and power supply. All of them must be enabled/activated to properly initialize and operate. This was initially handled in s3c-hsotg driver, which has been converted to 'gadget' part of dwc2 driver. Unfortunately, not all of this code got moved to common platform code, what resulted in accessing DWC2 registers without enabling low-level hardware resources. This fails for example on Exynos SoCs. This patch moves all the code for managing those resources to common platform.c file and provides convenient wrappers for controlling them. Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Marek Szyprowski 提交于
init_mutex is a leftover from the time, when s3c-hsotg driver did not implement proper pull up/down control and emulated it by enabling enabling/disabling usb phy. Proper pull up/down control has been added by commit 5b9451f8 ("usb: dwc2: gadget: use soft-disconnect udc feature in pullup() method"), so init_muxtex can be removed now to avoid potential deadlocks with other locks. Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 02 10月, 2015 2 次提交
-
-
由 Marek Szyprowski 提交于
Even when DWC2 is in (internal) suspended state, it should disable PHY in suspend and then enable it in resume. This patch fixes unbalanced PHY control sequence. Tested-by: NJohn Youn <johnyoun@synopsys.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
If dual role configuration is not selected, check and force dr_mode based on the selected configuration. Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Tested-by: NDinh Nguyen <dinguyen@opensource.altera.com> Tested-by: NJohn Youn <johnyoun@synopsys.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 27 9月, 2015 2 次提交
-
-
由 Heikki Krogerus 提交于
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
this driver has long ago became dwc2.ko with both peripheral and host roles, there's no point in keeping the old function names. Acked-by: NJohn Youn <johnyoun@synopsys.com> Tested-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 30 4月, 2015 4 次提交
-
-
由 Gregory Herrero 提交于
dwc2 may not be able to exit from hibernation if the hardware does not provide a way to detect resume signalling in this state. Thus, add the possibility to disable hibernation feature. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
So the parameters can be used in both host and gadget modes. Also consolidate param functions in the core.h Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
This is required due to an Intel specific hardware issue. Where id- pin setup causes glitches on the interrupt line when CONIDSTSCHG interrupt is enabled. Specify external_id_pin_ctl when an external driver (for example phy) can handle id change, so that CONIDSTSCHG interrupt can be disabled from the controller. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Prepare to add more debug code. Moreover, don't save dentry * for each file in struct dwc2_hsotg as clean up is done with debugfs_remove_recursive(). s3c_hsotg_delete_debug() is removed altogether for the same reason. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 13 3月, 2015 1 次提交
-
-
由 Marek Szyprowski 提交于
If device is configured to work only in HOST or DEVICE mode, there is no point in initializing both subdrivers. This patch also fixes resource leakage if host subdriver fails to initialize. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-