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 #include <console.h> 10 11 static int do_download(cmd_tbl_t *cmdtp, int flag, 12 int argc, char * const argv[]) 13 { 14 disable_ctrlc(1); 15 #ifdef CONFIG_CMD_ROCKUSB 16 run_command("rockusb 0 $devtype $devnum", 0); 17 #endif 18 printf("Enter rockusb failed, fallback to bootrom...\n"); 19 flushc(); 20 run_command("rbrom", 0); 21 22 return 0; 23 } 24 25 U_BOOT_CMD_ALWAYS( 26 download, 1, 1, do_download, 27 "enter rockusb/bootrom download mode", "" 28 ); 29