]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-sunxi/usb_phy.c
common: Pass the boot device into spl_boot_mode()
[u-boot] / arch / arm / mach-sunxi / usb_phy.c
index fa375f1d16de1a44e927e4f76cd19a876171c55f..f9993d28755149717095e31a4b847c6a30f58cc7 100644 (file)
@@ -52,7 +52,7 @@ static struct sunxi_usb_phy {
        int id;
        int init_count;
        int power_on_count;
-       int base;
+       ulong base;
 } sunxi_usb_phy[] = {
        {
                .usb_rst_mask = CCM_USB_CTRL_PHY0_RST | CCM_USB_CTRL_PHY0_CLK,
@@ -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;