feat(intel): enable SMC SoC FPGA bridges enable/disable

Enable SoC FPGA bridges enable/disable from non-secure world
through secure monitor calls

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I4474abab9731923a61ff0e7eb2c2fa32048001cb
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
This commit is contained in:
Abdul Halim, Muhammad Hadi Asyrafi 2020-06-18 16:21:29 +08:00 committed by Sieu Mun Tang
parent 44eb782e15
commit b7f3044e87
2 changed files with 17 additions and 0 deletions

View File

@ -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 */

View File

@ -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);