From ef51b097bfa906bf1cee8ee641a1b7bcc8c5f3c0 Mon Sep 17 00:00:00 2001 From: "Abdul Halim, Muhammad Hadi Asyrafi" Date: Thu, 5 Nov 2020 18:00:03 +0800 Subject: [PATCH] fix(intel): fix fpga config write return mechanism This revert commit 279c8015fefcb544eb311b9052f417fc02ab84aa. The previous change breaks this feature compatibility with Linux driver. Hence, the fix for the earlier issue is going to be fixed in uboot instead. Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi Signed-off-by: Jit Loon Lim Signed-off-by: Sieu Mun Tang Change-Id: I93220243bad65ed53322050d990544c7df4ce66b --- plat/intel/soc/common/socfpga_sip_svc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plat/intel/soc/common/socfpga_sip_svc.c b/plat/intel/soc/common/socfpga_sip_svc.c index adaa30aca..de47e05f7 100644 --- a/plat/intel/soc/common/socfpga_sip_svc.c +++ b/plat/intel/soc/common/socfpga_sip_svc.c @@ -270,8 +270,9 @@ static uint32_t intel_fpga_config_write(uint64_t mem, uint64_t size) intel_fpga_sdm_write_all(); if (!is_address_in_ddr_range(mem, size) || - is_fpga_config_buffer_full()) + is_fpga_config_buffer_full()) { return INTEL_SIP_SMC_STATUS_REJECTED; + } for (i = 0; i < FPGA_CONFIG_BUFFER_SIZE; i++) { int j = (i + current_buffer) % FPGA_CONFIG_BUFFER_SIZE; @@ -288,8 +289,9 @@ static uint32_t intel_fpga_config_write(uint64_t mem, uint64_t size) } } - if (is_fpga_config_buffer_full()) + if (is_fpga_config_buffer_full()) { return INTEL_SIP_SMC_STATUS_BUSY; + } return INTEL_SIP_SMC_STATUS_OK; }