From 231401de2eab8b8e503eb21afb6579ec24f872c6 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 5 May 2020 20:28:40 +0800 Subject: 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 --- board/freescale/imx8qxp_mek/spl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'board/freescale/imx8qxp_mek') 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 #include #include +#include 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) { -- cgit v1.2.3