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 #ifdef CONFIG_CMD_GO 17 printf("Enter rockusb failed, fallback to bootrom...\n"); 18 flushc(); 19 run_command("rbrom", 0); 20 #endif 21 return 0; 22 } 23 24 U_BOOT_CMD( 25 download, 1, 1, do_download, 26 "enter rockusb/bootrom download mode", "" 27 ); 28