diff --git a/plat/intel/soc/common/include/socfpga_sip_svc.h b/plat/intel/soc/common/include/socfpga_sip_svc.h index 9ca2bae31..63b28fb98 100644 --- a/plat/intel/soc/common/include/socfpga_sip_svc.h +++ b/plat/intel/soc/common/include/socfpga_sip_svc.h @@ -49,6 +49,7 @@ /* Send Mailbox Command */ #define INTEL_SIP_SMC_MBOX_SEND_CMD 0xC200001E +#define INTEL_SIP_SMC_HPS_SET_BRIDGES 0xC2000032 /* SiP Definitions */ diff --git a/plat/intel/soc/common/socfpga_sip_svc.c b/plat/intel/soc/common/socfpga_sip_svc.c index dc3a94b63..13ef80984 100644 --- a/plat/intel/soc/common/socfpga_sip_svc.c +++ b/plat/intel/soc/common/socfpga_sip_svc.c @@ -440,6 +440,18 @@ static uint32_t intel_mbox_send_cmd(uint32_t cmd, uint32_t *args, return INTEL_SIP_SMC_STATUS_OK; } +/* Miscellaneous HPS services */ +static uint32_t intel_hps_set_bridges(uint64_t enable) +{ + if (enable != 0U) { + socfpga_bridges_enable(); + } else { + socfpga_bridges_disable(); + } + + return INTEL_SIP_SMC_STATUS_OK; +} + /* * This function is responsible for handling all SiP calls from the NS world */ @@ -583,6 +595,10 @@ uintptr_t sip_smc_handler(uint32_t smc_fid, SIP_SVC_VERSION_MAJOR, SIP_SVC_VERSION_MINOR); + case INTEL_SIP_SMC_HPS_SET_BRIDGES: + status = intel_hps_set_bridges(x1); + SMC_RET1(handle, status); + default: return socfpga_sip_handler(smc_fid, x1, x2, x3, x4, cookie, handle, flags);