cmd: boot: add brom cmd to reboot to brom dnl mode
Change-Id: I797491ebe25af1013732aeee87e61e3ba4bc1689 Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
parent
c25c0ed054
commit
a3d7c00b32
18
cmd/boot.c
18
cmd/boot.c
|
|
@ -11,6 +11,8 @@
|
|||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <net.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/boot_mode.h>
|
||||
|
||||
#ifdef CONFIG_CMD_GO
|
||||
|
||||
|
|
@ -45,6 +47,14 @@ static int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||
return rcode;
|
||||
}
|
||||
|
||||
static int do_reboot_brom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
writel(BOOT_BROM_DOWNLOAD, CONFIG_ROCKCHIP_BOOT_MODE_REG);
|
||||
do_reset(NULL, 0, 0, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
U_BOOT_CMD(
|
||||
|
|
@ -57,11 +67,17 @@ U_BOOT_CMD(
|
|||
#endif
|
||||
|
||||
U_BOOT_CMD(
|
||||
reset, 1, 0, do_reset,
|
||||
rbrom, 1, 0, do_reboot_brom,
|
||||
"Perform RESET of the CPU",
|
||||
""
|
||||
);
|
||||
|
||||
U_BOOT_CMD(
|
||||
reset, 1, 0, do_reset,
|
||||
"Perform RESET of the CPU",
|
||||
""
|
||||
);
|
||||
|
||||
#ifdef CONFIG_CMD_POWEROFF
|
||||
U_BOOT_CMD(
|
||||
poweroff, 1, 0, do_poweroff,
|
||||
|
|
|
|||
Loading…
Reference in New Issue