diff options
author | Radu Bacrau <radu.bacrau@intel.com> | 2022-07-27 19:36:25 -0500 |
---|---|---|
committer | Lokanathan, Raaj <raaj.lokanathan@intel.com> | 2022-10-11 14:41:49 +0800 |
commit | a58aac9cf49037951b9d99e0b16f32bfedd13bf3 (patch) | |
tree | 69c3fd336d4fea783c1f6030f00ac183761be303 | |
parent | 32896501874cd38b28aefe98d156e1779a2a2857 (diff) | |
download | u-boot-socfpga-a58aac9cf49037951b9d99e0b16f32bfedd13bf3.tar.gz |
HSD #14016953396: rsu: ignore fw cpb errors after fixing cpbs
Ignored firmware reported corrupted cpb errors after creating empty cpbs
and after restoring cpbs from memory buffer.
Signed-off-by: Radu Bacrau <radu.bacrau@intel.com>
-rw-r--r-- | arch/arm/mach-socfpga/rsu_ll_qspi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-socfpga/rsu_ll_qspi.c b/arch/arm/mach-socfpga/rsu_ll_qspi.c index f0559741e5..2522cea1c0 100644 --- a/arch/arm/mach-socfpga/rsu_ll_qspi.c +++ b/arch/arm/mach-socfpga/rsu_ll_qspi.c @@ -119,6 +119,7 @@ static u32 spt1_offset; static int cpb0_part = -1; static int cpb1_part = -1; static bool cpb_corrupted; +static bool cpb_fixed; static bool spt_corrupted; static int load_cpb(void); @@ -880,13 +881,13 @@ static int load_cpb(void) return -EINVAL; } - if (status_info.state == STATE_CPB0_CPB1_CORRUPTED) { + if (!cpb_fixed && status_info.state == STATE_CPB0_CPB1_CORRUPTED) { rsu_log(RSU_ERR, "FW detects both CPBs corrupted\n"); cpb_corrupted = true; return -EINVAL; } - if (status_info.state == STATE_CPB0_CORRUPTED) { + if (!cpb_fixed && status_info.state == STATE_CPB0_CORRUPTED) { rsu_log(RSU_ERR, "FW detects corrupted CPB0 but CPB1 is fine\n"); cpb0_corrupted = 1; @@ -1131,6 +1132,7 @@ static int empty_cpb(void) cpb_slots = (u64 *)&cpb.data[cpb.header.image_ptr_offset]; cpb_corrupted = false; + cpb_fixed = true; ops_error: free(c_header); @@ -1193,6 +1195,7 @@ static int restore_cpb_from_address(u64 address) cpb_slots = (u64 *)&cpb.data[cpb.header.image_ptr_offset]; cpb_corrupted = false; + cpb_fixed = true; return 0; } @@ -1785,6 +1788,7 @@ static void ll_exit(void) cpb0_part = -1; cpb1_part = -1; cpb_corrupted = false; + cpb_fixed = false; spt_corrupted = false; if (flash) { |