mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-02 01:19:49 +00:00
c9f8947e66
USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this. Currently we power off the USB ports both on a "usb reset" and when booting the kernel, causing the usb-power to bounce off and then back on again. This patch removes the powering off calls, fixing the undesirable power bouncing. Note this requires some special handling for the OTG port: 1) We must skip the external vbus check if we've already enabled our own vbus to avoid false positives 2) If on an usb reset we no longer detect that the id-pin is grounded, turn off vbus as that means an external vbus may be present now Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
29 lines
895 B
C
29 lines
895 B
C
/*
|
|
* Sunxi usb-phy code
|
|
*
|
|
* Copyright (C) 2015 Hans de Goede <hdegoede@redhat.com>
|
|
* Copyright (C) 2014 Roman Byshko <rbyshko@gmail.com>
|
|
*
|
|
* Based on code from
|
|
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
int sunxi_usb_phy_probe(void);
|
|
int sunxi_usb_phy_remove(void);
|
|
void sunxi_usb_phy_init(int index);
|
|
void sunxi_usb_phy_exit(int index);
|
|
void sunxi_usb_phy_power_on(int index);
|
|
void sunxi_usb_phy_power_off(int index);
|
|
int sunxi_usb_phy_power_is_on(int index);
|
|
int sunxi_usb_phy_vbus_detect(int index);
|
|
int sunxi_usb_phy_id_detect(int index);
|
|
void sunxi_usb_phy_enable_squelch_detect(int index, int enable);
|
|
|
|
/* Not really phy related, but we have to declare this somewhere ... */
|
|
#if defined(CONFIG_USB_MUSB_HOST) || defined(CONFIG_USB_MUSB_GADGET)
|
|
void sunxi_musb_board_init(void);
|
|
#else
|
|
#define sunxi_musb_board_init()
|
|
#endif
|