diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-15 07:23:50 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-15 07:55:11 -0500 |
commit | 83e13c3469c710af03bf43f53aede0f9b7ba2dd0 (patch) | |
tree | 411d6bc9f7f2dbe605fcc979f680b286fabba695 /arch/arm/mach-socfpga/reset_manager_s10.c | |
parent | 35772ff4f63a302e0b873096372c70292fb0af79 (diff) | |
parent | 40551cf99c237f93d9e0e07b6dd8f31b3868a0f0 (diff) |
Merge branch '2021.04-rc' of https://github.com/lftan/u-boot
- Add ATF flow for SoC64 devices
- Update socfpgaimage to support print header and update padding flow
Diffstat (limited to 'arch/arm/mach-socfpga/reset_manager_s10.c')
-rw-r--r-- | arch/arm/mach-socfpga/reset_manager_s10.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/reset_manager_s10.c b/arch/arm/mach-socfpga/reset_manager_s10.c index 3746e6a60c3..af8f2c08731 100644 --- a/arch/arm/mach-socfpga/reset_manager_s10.c +++ b/arch/arm/mach-socfpga/reset_manager_s10.c @@ -5,11 +5,14 @@ */ #include <common.h> +#include <hang.h> #include <asm/io.h> #include <asm/arch/reset_manager.h> +#include <asm/arch/smc_api.h> #include <asm/arch/system_manager.h> #include <dt-bindings/reset/altr,rst-mgr-s10.h> #include <linux/iopoll.h> +#include <linux/intel-smc.h> DECLARE_GLOBAL_DATA_PTR; @@ -55,6 +58,15 @@ void socfpga_per_reset_all(void) void socfpga_bridges_reset(int enable) { +#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_ATF) + u64 arg = enable; + + int ret = invoke_smc(INTEL_SIP_SMC_HPS_SET_BRIDGES, &arg, 1, NULL, 0); + if (ret) { + printf("SMC call failed with error %d in %s.\n", ret, __func__); + return; + } +#else u32 reg; if (enable) { @@ -101,6 +113,7 @@ void socfpga_bridges_reset(int enable) /* Disable NOC timeout */ writel(0, socfpga_get_sysmgr_addr() + SYSMGR_SOC64_NOC_TIMEOUT); } +#endif } /* |