]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_usb.c
MIPS: fix syntax for fdt_chosen/initrd.
[u-boot] / common / cmd_usb.c
index 2ed4cb474f8a7d00c16cc64d6081530e6007a9f0..6874af7547148276f8b9564aa1e4b4e01ba8c7e1 100644 (file)
@@ -22,8 +22,8 @@
 #ifdef CONFIG_USB_STORAGE
 static int usb_stor_curr_dev = -1; /* current device */
 #endif
-#ifdef CONFIG_USB_HOST_ETHER
-static int usb_ether_curr_dev = -1; /* current ethernet device */
+#if defined(CONFIG_USB_HOST_ETHER) && !defined(CONFIG_DM_ETH)
+static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */
 #endif
 
 /* some display routines (info command) */
@@ -532,8 +532,14 @@ static void do_usb_start(void)
 #endif
 #endif
 #ifdef CONFIG_USB_HOST_ETHER
+# ifdef CONFIG_DM_ETH
+#  ifndef CONFIG_DM_USB
+#   error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH"
+#  endif
+# else
        /* try to recognize ethernet devices immediately */
        usb_ether_curr_dev = usb_host_eth_scan(1);
+# endif
 #endif
 #ifdef CONFIG_USB_KEYBOARD
        drv_usb_kbd_init();