test: rockchip: add bootrom download mode test

Enter bootrom download mode by command: rktest brom_dnl

Change-Id: I6120a885e5514a57c81fd469ce27a2472009c4fd
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan 2017-11-13 15:26:40 +08:00 committed by Kever Yang
parent 4334dc85d1
commit 5e7e40617c
4 changed files with 13 additions and 0 deletions

View File

@ -12,3 +12,4 @@ obj-y += test-regulator.o
obj-y += test-rknand.o
obj-$(CONFIG_GMAC_ROCKCHIP) += test-eth.o
obj-$(CONFIG_RK_IR) += test-ir.o
obj-y += test-brom-dnl.o

View File

@ -0,0 +1,9 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/boot_mode.h>
int board_brom_dnl_test(int argc, char * const argv[])
{
writel(BOOT_BROM_DOWNLOAD, CONFIG_ROCKCHIP_BOOT_MODE_REG);
return do_reset(NULL, 0, 0, NULL);
}

View File

@ -25,6 +25,7 @@ static board_module_t g_board_modules[] = {
#if defined(CONFIG_RK_IR)
{ .name = "ir", .test = board_ir_test },
#endif
{ .name = "brom_dnl", .test = board_brom_dnl_test}
};
static int do_rockchip_test(cmd_tbl_t *cmdtp, int flag,

View File

@ -19,4 +19,6 @@ int board_eth_test(int argc, char * const argv[]);
int board_ir_test(int argc, char * const argv[]);
#endif
int board_brom_dnl_test(int argc, char * const argv[]);
#endif /* _TEST_ROCKCHIP_H */