diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-01-06 14:27:42 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-01-18 12:31:35 +0100 |
commit | a1d31077d06d47233d2bd7002cf65d5ee9b5e501 (patch) | |
tree | 7c3754ffa1292d797b32fdaf517b426445638f21 | |
parent | b5072264054879b4cdfe8219404a0b2347d933b5 (diff) |
config_distro_bootcmd.h: Remove unnecessary magic to avoid repeated USB scans
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>
-rw-r--r-- | include/config_distro_bootcmd.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index be616e8bfd..becbe3fa7c 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -90,15 +90,8 @@ #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) @@ -106,7 +99,6 @@ #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 @@ -202,7 +194,7 @@ \ 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" |