intel: FPGA config_isdone() status query

SiP CONFIG_ISDONE now will query status for either CONFIG_STATUS or
RECONFIG_STATUS based on passed parameter

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Idb8a84af4e98654759843de09a289d31246c9a91
diff --git a/plat/intel/soc/common/socfpga_sip_svc.c b/plat/intel/soc/common/socfpga_sip_svc.c
index ce88fb4..f9ba235 100644
--- a/plat/intel/soc/common/socfpga_sip_svc.c
+++ b/plat/intel/soc/common/socfpga_sip_svc.c
@@ -93,9 +93,14 @@
 	return 0;
 }
 
-static uint32_t intel_mailbox_fpga_config_isdone(void)
+static uint32_t intel_mailbox_fpga_config_isdone(uint32_t query_type)
 {
-	uint32_t ret = intel_mailbox_get_config_status(MBOX_RECONFIG_STATUS);
+	uint32_t ret;
+
+	if (query_type == 1)
+		ret = intel_mailbox_get_config_status(MBOX_CONFIG_STATUS);
+	else
+		ret = intel_mailbox_get_config_status(MBOX_RECONFIG_STATUS);
 
 	if (ret) {
 		if (ret == MBOX_CFGSTAT_STATE_CONFIG)
@@ -368,7 +373,7 @@
 		SMC_UUID_RET(handle, intl_svc_uid);
 
 	case INTEL_SIP_SMC_FPGA_CONFIG_ISDONE:
-		status = intel_mailbox_fpga_config_isdone();
+		status = intel_mailbox_fpga_config_isdone(x1);
 		SMC_RET4(handle, status, 0, 0, 0);
 
 	case INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM: