diff options
author | Peng Fan <peng.fan@nxp.com> | 2020-05-05 20:28:40 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-05-10 20:55:20 +0200 |
commit | 231401de2eab8b8e503eb21afb6579ec24f872c6 (patch) | |
tree | 34f496d11fca0c3d0faa25839a98ed43ca25d3ec /board | |
parent | 8103767256dde5e0ca949790f0896268ae0832d3 (diff) | |
download | u-boot-231401de2eab8b8e503eb21afb6579ec24f872c6.tar.gz |
imx: imx8qm/imx8qxp: Power down the resources before SPL jump to u-boot
Make sure that all devices that are powered up by SPL are powered down
before entering into the u-boot. Otherwise the subsystem/device will
never be powered down by SCFW, due to SPL and u-boot are in different
partitions.
Benefiting from power domain driver, this patch implements the function
"imx8_power_off_pd_devices" to power off all active devices.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/imx8qm_mek/spl.c | 6 | ||||
-rw-r--r-- | board/freescale/imx8qxp_mek/spl.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c index cb4006eb2a..ba99002cf2 100644 --- a/board/freescale/imx8qm_mek/spl.c +++ b/board/freescale/imx8qm_mek/spl.c @@ -12,6 +12,7 @@ #include <dm/uclass-internal.h> #include <dm/device-internal.h> #include <dm/lists.h> +#include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR; @@ -37,6 +38,11 @@ void spl_board_init(void) puts("Normal Boot\n"); } +void spl_board_prepare_for_boot(void) +{ + imx8_power_off_pd_devices(NULL, 0); +} + #ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c index e4e4cbe716..32b61095b0 100644 --- a/board/freescale/imx8qxp_mek/spl.c +++ b/board/freescale/imx8qxp_mek/spl.c @@ -17,6 +17,7 @@ #include <asm/arch/sci/sci.h> #include <asm/arch/imx8-pins.h> #include <asm/arch/iomux.h> +#include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR; @@ -55,6 +56,11 @@ void spl_board_init(void) puts("Normal Boot\n"); } +void spl_board_prepare_for_boot(void) +{ + imx_power_off_pd_devices(NULL, 0); +} + #ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { |