u-boot-brain/drivers/usb
Hans de Goede 7c22e26ec5 sunxi: musb: Re-init musb controller on repeated probe calls
With sunxi-musb musb_lowlevel_init() can fail when a charger; or no cable
is plugged into the otg port.

To avoid leaking the struct musb allocated by musb_init_controller()
on repeated musb_usb_probe() calls, we were caching its result.
But musb_init_controller() does more, such as calling sunxi_musb_init()
which enables the clocks.

Not calling sunxi_musb_init() causes the musb controller to stop working
after a "usb reset" since that calls musb_usb_remove() which disables the
clocks.

This commit fixes this by removing the caching of the struct returned
from musb_init_controller(), it replaces this by free-ing the allocated
memory in musb_usb_remove() and calling musb_usb_remove() on
musb_usb_probe() errors to ensure proper cleanup.

While at it also make musb_usb_probe() and musb_usb_remove() static.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-09-18 14:39:16 +02:00
..
common armv8: fsl-layerscape: Append "A" in SoC name for ARM based SoCs 2016-06-28 12:08:53 -07:00
dwc3 usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled 2016-05-27 15:39:49 -04:00
emul dm: Use dm_scan_fdt_dev() directly where possible 2016-07-27 14:15:54 -06:00
eth net: asix: Fix AX88772B when used with DriverModel 2016-09-09 13:13:42 -05:00
gadget fastboot: implement Kconfig 2016-08-20 14:03:23 -04:00
host dm: atmel: Add driver model support for the ehci driver 2016-08-15 22:58:04 +02:00
musb Fix spelling of "occurred". 2016-05-02 18:37:09 -04:00
musb-new sunxi: musb: Re-init musb controller on repeated probe calls 2016-09-18 14:39:16 +02:00
phy usb: rockchip-phy: implement USB2.0 phy control 2016-07-25 20:44:19 -06:00
ulpi usb: ulpi: Fix compile warning in read/write on 64-bit machines. 2016-04-01 17:18:09 -04:00
Kconfig usb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig 2016-04-20 11:43:27 +02:00