diff options
author | Faiz Abbas <faiz_abbas@ti.com> | 2020-02-26 11:14:36 +0300 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-03-09 03:33:16 +0300 |
commit | d45ffb79376a9ab28ddfd2a61111a1732541289a (patch) | |
tree | a6e5559f6801d6a07c542055ec24e7ebd5d16f3a /arch/arm/mach-k3/sysfw-loader.c | |
parent | cf0082559698765a96f96cb3811db6a91c02ca82 (diff) | |
download | u-boot-d45ffb79376a9ab28ddfd2a61111a1732541289a.tar.xz |
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.c | 6 |
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); |