@@ -17,6 +17,7 @@
#include <asm/arch/misc.h>
#include <asm/pl310.h>
#include <linux/libfdt.h>
+#include <linux/intel-smc.h>
#include <asm/arch/mailbox_s10.h>
#include <asm/arch/secure_reg_helper.h>
@@ -154,11 +155,24 @@ void do_bridge_reset(int enable, unsigned int mask)
{
/* Check FPGA status before bridge enable */
if (enable) {
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_ATF)
+ u64 arg = 1;
+
+ /* Send MBOX_RECONFIG_STATUS to SDM */
+ int ret = invoke_smc(INTEL_SIP_SMC_FPGA_CONFIG_ISDONE, NULL, 0,
+ NULL, 0);
+
+ if (ret && ret != INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY) {
+ /* Send MBOX_CONFIG_STATUS to SDM */
+ ret = invoke_smc(INTEL_SIP_SMC_FPGA_CONFIG_ISDONE,
+ &arg, 1, NULL, 0);
+ }
+#else
int ret = mbox_get_fpga_config_status(MBOX_RECONFIG_STATUS);
if (ret && ret != MBOX_CFGSTAT_STATE_CONFIG)
ret = mbox_get_fpga_config_status(MBOX_CONFIG_STATUS);
-
+#endif
if (ret)
return;
}