summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYau Wai Gan <yau.wai.gan@intel.com>2021-04-14 10:17:11 +0800
committerYau Wai Gan <yau.wai.gan@intel.com>2021-04-14 10:17:11 +0800
commit97877488c1fe9435f8c2626cc1ae900260a17600 (patch)
treeab8af76a313c76a50b8b50a84fcf0c4c5ff06299
parentbcc89541546a422ad0369be660a091139389120d (diff)
downloadu-boot-socfpga-rel_socfpga_v2021.01_RC_21.04.02_pr.tar.gz
drivers: fpga: intel_sdm_mb: Flush cache before FPGA configurationrel_socfpga_v2021.01_RC_21.04.02_prsocfpga_v2021.01_RC
FPGA configuration encounter failure when the cache is not flushed. Add cache flushing to the memory region that holds the FPGA configuration bitstream. Signed-off-by: Yau Wai Gan <yau.wai.gan@intel.com>
-rw-r--r--drivers/fpga/intel_sdm_mb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/fpga/intel_sdm_mb.c b/drivers/fpga/intel_sdm_mb.c
index c2e425766b..7f067d7bc4 100644
--- a/drivers/fpga/intel_sdm_mb.c
+++ b/drivers/fpga/intel_sdm_mb.c
@@ -9,6 +9,8 @@
#include <watchdog.h>
#include <asm/arch/mailbox_s10.h>
#include <asm/arch/smmu_s10.h>
+#include <asm/cache.h>
+#include <cpu_func.h>
#include <linux/delay.h>
#define RECONFIG_STATUS_POLL_RESP_TIMEOUT_MS 60000
@@ -122,6 +124,8 @@ int intel_sdm_mb_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size)
debug("Invoking FPGA_CONFIG_START...\n");
+ flush_dcache_range((unsigned long)rbf_data, (unsigned long)(rbf_data + rbf_size));
+
ret = invoke_smc(INTEL_SIP_SMC_FPGA_CONFIG_START, &arg, 1, NULL, 0);
if (ret) {
@@ -397,6 +401,8 @@ int intel_sdm_mb_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size)
u32 resp_len = 2;
u32 resp_buf[2];
+ flush_dcache_range((unsigned long)rbf_data, (unsigned long)(rbf_data + rbf_size));
+
/*
* Don't start the FPGA reconfiguration if bitstream location exceed the
* PSI BE 512MB address window and SMMU is not setup for PSI BE address