diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-04-01 22:39:26 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-04-12 08:58:03 +0200 |
commit | 2c3c3ecb596c3b15b5269c56c5e20f39c2c59102 (patch) | |
tree | 918e716a2029e850a0a38999146fc35a86b0cdb6 /arch | |
parent | bbf8bef196ae52517284a0a2e2ffc94a4ff89f5f (diff) | |
download | u-boot-imx-2c3c3ecb596c3b15b5269c56c5e20f39c2c59102.zip u-boot-imx-2c3c3ecb596c3b15b5269c56c5e20f39c2c59102.tar.gz u-boot-imx-2c3c3ecb596c3b15b5269c56c5e20f39c2c59102.tar.bz2 |
sunxi: Add INITIAL_USB_SCAN_DELAY Kconfig option
Some boards have on board usb devices which need longer than the USB
spec's 1 second to connect from board powerup. Add a config option which
when non 0 adds an extra delay before the first usb bus scan.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-sunxi/usb_phy.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-sunxi/usb_phy.c b/arch/arm/mach-sunxi/usb_phy.c index b258ce4..f9993d2 100644 --- a/arch/arm/mach-sunxi/usb_phy.c +++ b/arch/arm/mach-sunxi/usb_phy.c @@ -85,6 +85,8 @@ static struct sunxi_usb_phy { #endif }; +static int initial_usb_scan_delay = CONFIG_INITIAL_USB_SCAN_DELAY; + static int get_vbus_gpio(int index) { switch (index) { @@ -269,6 +271,11 @@ void sunxi_usb_phy_power_on(int index) { struct sunxi_usb_phy *phy = &sunxi_usb_phy[index]; + if (initial_usb_scan_delay) { + mdelay(initial_usb_scan_delay); + initial_usb_scan_delay = 0; + } + phy->power_on_count++; if (phy->power_on_count != 1) return; |