summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-k3/sysfw-loader.c
diff options
context:
space:
mode:
authorFaiz Abbas <faiz_abbas@ti.com>2020-02-26 13:44:36 +0530
committerPeng Fan <peng.fan@nxp.com>2020-03-09 08:33:16 +0800
commitd45ffb79376a9ab28ddfd2a61111a1732541289a (patch)
treea6e5559f6801d6a07c542055ec24e7ebd5d16f3a /arch/arm/mach-k3/sysfw-loader.c
parentcf0082559698765a96f96cb3811db6a91c02ca82 (diff)
downloadu-boot-d45ffb79376a9ab28ddfd2a61111a1732541289a.tar.gz
u-boot-d45ffb79376a9ab28ddfd2a61111a1732541289a.tar.xz
u-boot-d45ffb79376a9ab28ddfd2a61111a1732541289a.zip
arm: K3: sysfw-loader: Add a config_pm_pre_callback()
System firmware does not guarantee that clocks going out of the device will be stable during power management configuration. There are some DCRC errors when SPL tries to get the next stage during eMMC boot after sysfw pm configuration. Therefore add a config_pm_pre_callback() to switch off the eMMC clock before power management and restart it after it is done. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-k3/sysfw-loader.c')
-rw-r--r--arch/arm/mach-k3/sysfw-loader.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 94dbeb9437..db02607b17 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -197,7 +197,8 @@ exit:
}
#endif
-void k3_sysfw_loader(void (*config_pm_done_callback)(void))
+void k3_sysfw_loader(void (*config_pm_pre_callback) (void),
+ void (*config_pm_done_callback)(void))
{
struct spl_image_info spl_image = { 0 };
struct spl_boot_device bootdev = { 0 };
@@ -291,6 +292,9 @@ void k3_sysfw_loader(void (*config_pm_done_callback)(void))
/* Get handle for accessing SYSFW services */
ti_sci = get_ti_sci_handle();
+ if (config_pm_pre_callback)
+ config_pm_pre_callback();
+
/* Parse and apply the different SYSFW configuration fragments */
k3_sysfw_configure_using_fit(sysfw_load_address, ti_sci);