1 /* 2 * (C) Copyright 2019 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #include <common.h> 8 #include <command.h> 9 10 static int do_download(cmd_tbl_t *cmdtp, int flag, 11 int argc, char * const argv[]) 12 { 13 #ifdef CONFIG_CMD_ROCKUSB 14 run_command("rockusb 0 $devtype $devnum", 0); 15 #endif 16 printf("Enter rockusb failed, fallback to bootrom...\n"); 17 flushc(); 18 run_command("rbrom", 0); 19 20 return 0; 21 } 22 23 U_BOOT_CMD_ALWAYS( 24 download, 1, 1, do_download, 25 "enter rockusb/bootrom download mode", "" 26 ); 27