cmd: rockusb: reboot to boot ROM rockusb while using slc nand
The rockusb in u-boot could not support BLK_MTD_NAND and BLK_MTD_SPI_NAND, need reboot to boot ROM. Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I16d9f25d84322c9752e2e62451cd7b8c0aa16f02 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
parent
e66d4537db
commit
1b01cf5590
|
|
@ -170,6 +170,17 @@ static int do_rkusb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return CMD_RET_FAILURE;
|
return CMD_RET_FAILURE;
|
||||||
|
|
||||||
|
if (g_rkusb->ums[0].block_dev.if_type == IF_TYPE_MTD &&
|
||||||
|
g_rkusb->ums[0].block_dev.devnum == BLK_MTD_NAND) {
|
||||||
|
#ifdef CONFIG_CMD_GO
|
||||||
|
pr_err("Enter bootrom rockusb...\n");
|
||||||
|
flushc();
|
||||||
|
run_command("rbrom", 0);
|
||||||
|
#else
|
||||||
|
pr_err("rockusb: count not support loader upgrade!\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
controller_index = (unsigned int)(simple_strtoul(
|
controller_index = (unsigned int)(simple_strtoul(
|
||||||
usb_controller, NULL, 0));
|
usb_controller, NULL, 0));
|
||||||
rc = usb_gadget_initialize(controller_index);
|
rc = usb_gadget_initialize(controller_index);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue