From b9fef81f38dabc4bc397f402ec8d3d3e2c19ffe7 Mon Sep 17 00:00:00 2001 From: Troy Kisky <troy.kisky@boundarydevices.com> Date: Mon, 19 Mar 2018 18:30:22 -0700 Subject: [PATCH] cmd: bootz: add board_power_check option Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> --- cmd/bootz.c | 3 +++ include/common.h | 2 ++ scripts/config_whitelist.txt | 1 + 3 files changed, 6 insertions(+) diff --git a/cmd/bootz.c b/cmd/bootz.c index 0e75509ee96..d70fe386f0a 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -61,6 +61,9 @@ int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int ret; +#ifdef CONFIG_SYS_BOOT_BOARD_POWER_CHECK + board_power_check(); +#endif /* Consume 'bootz' */ argc--; argv++; diff --git a/include/common.h b/include/common.h index 559013a3a85..62a7e14aa2f 100644 --- a/include/common.h +++ b/include/common.h @@ -298,6 +298,8 @@ int board_fix_fdt (void *rw_fdt_blob); /* manipulate the U-Boot fdt before its r int board_late_init (void); int board_postclk_init (void); /* after clocks/timebase, before env/serial */ int board_early_init_r (void); +void board_poweroff (void); +void board_power_check(void); #if defined(CONFIG_SYS_DRAM_TEST) int testdram(void); diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index ada4ffef1be..2f74735d1a4 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -2137,6 +2137,7 @@ CONFIG_SYS_BOOTM_LEN CONFIG_SYS_BOOTPARAMS_LEN CONFIG_SYS_BOOTSZ CONFIG_SYS_BOOT_BLOCK +CONFIG_SYS_BOOT_BOARD_POWER_CHECK CONFIG_SYS_BOOT_RAMDISK_HIGH CONFIG_SYS_BR0_64M CONFIG_SYS_BR0_8M -- GitLab