]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
config_distro_bootcmd.h: Remove unnecessary magic to avoid repeated USB scans
authorHans de Goede <hdegoede@redhat.com>
Tue, 6 Jan 2015 13:27:42 +0000 (14:27 +0100)
committerMarek Vasut <marex@denx.de>
Sun, 18 Jan 2015 11:31:35 +0000 (12:31 +0100)
Now that "usb start" will only start usb if not already started, we can simply
call "usb start" whenever we (may) need access to usb devices, and it will only
actually scan the bus at the first call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
include/config_distro_bootcmd.h

index be616e8bfd0e0578d54c0414e29599885ada17e8..becbe3fa7cc29c80d2236db1da62e2278a36ff98 100644 (file)
 #endif
 
 #ifdef CONFIG_CMD_USB
-#define BOOTENV_RUN_USB_INIT "run usb_init; "
-#define BOOTENV_SET_USB_NEED_INIT "setenv usb_need_init; "
+#define BOOTENV_RUN_USB_INIT "usb start; "
 #define BOOTENV_SHARED_USB \
-       "usb_init=" \
-               "if ${usb_need_init}; then " \
-                       "setenv usb_need_init false; " \
-                       "usb start 0; " \
-               "fi\0" \
-       \
        "usb_boot=" \
                BOOTENV_RUN_USB_INIT \
                BOOTENV_SHARED_BLKDEV_BODY(usb)
 #define BOOTENV_DEV_NAME_USB   BOOTENV_DEV_NAME_BLKDEV
 #else
 #define BOOTENV_RUN_USB_INIT
-#define BOOTENV_SET_USB_NEED_INIT
 #define BOOTENV_SHARED_USB
 #define BOOTENV_DEV_USB \
        BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
        \
        BOOT_TARGET_DEVICES(BOOTENV_DEV)                                  \
        \
-       "bootcmd=" BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT   \
+       "bootcmd=" BOOTENV_SET_SCSI_NEED_INIT                             \
                "for target in ${boot_targets}; do "                      \
                        "run bootcmd_${target}; "                         \
                "done\0"