From: Richard Gong <richard.g...@intel.com>

commit  f1835b2b7aa23cc1b47c178a3eb414eaf58fde63 from
https://github.com/altera-opensource/linux-socfpga.git

Firmware from the latest Quartus releases takes more time to process
data. As a result service layer needs increase timeout value so it can
claim back the submitted data buffer(s) from the secure world to program
FPGA properly.

Also add pr_err() to provide the error return value for the case
which service layer fails to make a SMC call to secure world for the
shared memory block reserved by secure monitor software.

Signed-off-by: Richard Gong <richard.g...@intel.com>
Signed-off-by: Meng Li <meng...@windriver.com>
---
 drivers/misc/intel-service.c         |    4 +++-
 include/linux/intel-service-client.h |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/intel-service.c b/drivers/misc/intel-service.c
index c87d9aa..4c63330 100644
--- a/drivers/misc/intel-service.c
+++ b/drivers/misc/intel-service.c
@@ -55,7 +55,7 @@
  * from the secure world for FPGA manager to reuse, or to free the buffer(s)
  * when all bit-stream data had be send.
  */
-#define FPGA_CONFIG_DATA_CLAIM_TIMEOUT_MS      20
+#define FPGA_CONFIG_DATA_CLAIM_TIMEOUT_MS      200
 /*
  * FPGA_CONFIG_STATUS_TIMEOUT_SEC - poll the FPGA configuration status,
  * service layer will return error to FPGA manager when timeout occurs,
@@ -642,6 +642,8 @@ static int svc_normal_to_secure_shm_thread(void *data)
                sh_mem->addr = res.a1;
                sh_mem->size = res.a2;
        } else {
+               pr_err("%s: after SMC call -- res.a0=0x%016x",  __func__,
+                      (unsigned int)res.a0);
                sh_mem->addr = 0;
                sh_mem->size = 0;
        }
diff --git a/include/linux/intel-service-client.h 
b/include/linux/intel-service-client.h
index aac16ab..8cef141 100644
--- a/include/linux/intel-service-client.h
+++ b/include/linux/intel-service-client.h
@@ -49,7 +49,7 @@
 
 /* Timeout settings for FPGA manager driver */
 #define SVC_RECONFIG_REQUEST_TIMEOUT_MS         100
-#define SVC_RECONFIG_BUFFER_TIMEOUT_MS          100
+#define SVC_RECONFIG_BUFFER_TIMEOUT_MS          240
 
 struct intel_svc_chan;
 
-- 
1.7.9.5

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to