aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-ti.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: cdns3-ti: run HW init at resume() if HW was resetThéo Lebrun2025-03-141-0/+25
| | | | | | | | | | | | | At runtime_resume(), read the W1 (Wrapper Register 1) register to detect if an hardware reset occurred. If it did, run the hardware init sequence. This callback will be called at system-wide resume. Previously, if a reset occurred during suspend, we would crash. The wrapper config had not been written, leading to invalid register accesses inside cdns3. Signed-off-by: Théo Lebrun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: cdns3-ti: move reg writes to separate functionThéo Lebrun2025-03-141-38/+44
| | | | | | | | | | | | The device probe function mixes management code and hardware initialisation code. Extract the latter into an explicitly named cdns_ti_reset_and_init_hw() function to clarify intent. It also will allow easier transition to using runtime PM for triggering HW init. Reviewed-by: Roger Quadros <[email protected]> Signed-off-by: Théo Lebrun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: Switch back to struct platform_driver::remove()Uwe Kleine-König2024-10-041-1/+1
| | | | | | | | | | | | | | | After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/usb to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: cdns3-ti: Add workaround for Errata i2409Roger Quadros2024-06-041-1/+14
| | | | | | | | | | | | | | TI USB2 PHY is known to have a lockup issue on very short suspend intervals. Enable the Suspend Residency quirk flag to workaround this as described in Errata i2409 [1]. [1] - https://www.ti.com/lit/er/sprz457h/sprz457h.pdf Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Ravi Gunasekaran <[email protected]> Acked-by: Peter Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: Explicitly include correct DT includesRob Herring2023-07-251-0/+1
| | | | | | | | | | | | | | | | The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Herve Codina <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: cdns3-ti: Convert to platform remove callback returning voidUwe Kleine-König2023-05-281-4/+2
| | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: cdns3: cdns3-ti: File headers are not good candidates for kernel-docLee Jones2021-05-271-1/+1
| | | | | | | | | | | | | | | | | Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdns3-ti.c:20: warning: expecting prototype for cdns3(). Prototype was for USBSS_PID() instead Cc: Peter Chen <[email protected]> Cc: Pawel Laszczak <[email protected]> Cc: Roger Quadros <[email protected]> Cc: Aswath Govindraju <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Acked-by: Peter Chen <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: cdns3: Add support for TI's AM64 SoCAswath Govindraju2021-01-231-0/+1
| | | | | | | Add support for USB controller present on the AM64x SoC. Signed-off-by: Aswath Govindraju <[email protected]> Signed-off-by: Peter Chen <[email protected]>
* USB: Replace HTTP links with HTTPS onesAlexander A. Klimov2020-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: cdns3: Fix runtime PM imbalance on errorDinghao Liu2020-05-251-2/+1
| | | | | | | | | | pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Reviewed-by: Peter Chen <[email protected]> Signed-off-by: Dinghao Liu <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
* usb: cdns3: make signed 1 bit bitfields unsignedColin Ian King2020-03-261-2/+2
| | | | | | | | | The signed 1 bit bitfields should be unsigned, so make them unsigned. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Peter Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* usb: cdns3: Add TI specific wrapper driverRoger Quadros2019-10-291-0/+236
The J721e platform comes with 2 Cadence USB3 controller instances. This driver supports the TI specific wrapper on this platform. Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Sekhar Nori <[email protected]> Reviewed-by: Pawel Laszczak <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>