Merge "arch: common: add support for TRY mode in boootconfig"

This commit is contained in:
Linux Build Service Account 2022-11-16 10:35:28 -08:00 committed by Gerrit - the friendly Code Review server
commit 2a55e3f34e
2 changed files with 7 additions and 4 deletions

View file

@ -524,7 +524,8 @@ int smem_bootconfig_info(void)
ret = smem_read_alloc_entry(SMEM_BOOT_DUALPARTINFO,
&qca_smem_bootconfig_info, sizeof(qca_smem_bootconfig_info_t));
if ((ret != 0) ||
(qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START) ||
((qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START) &&
(qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START_TRYMODE)) ||
(qca_smem_bootconfig_info.magic_end != _SMEM_DUAL_BOOTINFO_MAGIC_END))
return -ENOMSG;
@ -580,7 +581,8 @@ int smem_update_bootconfig_to_flash(void)
}
}
if (qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START) {
if ((qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START) &&
(qca_smem_bootconfig_info.magic_start != _SMEM_DUAL_BOOTINFO_MAGIC_START_TRYMODE)) {
if(smem_bootconfig_info() != 0)
return -1;
}

View file

@ -112,8 +112,9 @@ struct per_part_info
typedef struct
{
#define _SMEM_DUAL_BOOTINFO_MAGIC_START 0xA3A2A1A0
#define _SMEM_DUAL_BOOTINFO_MAGIC_END 0xB3B2B1B0
#define _SMEM_DUAL_BOOTINFO_MAGIC_START 0xA3A2A1A0
#define _SMEM_DUAL_BOOTINFO_MAGIC_START_TRYMODE 0xA3A2A1A1
#define _SMEM_DUAL_BOOTINFO_MAGIC_END 0xB3B2B1B0
/* Magic number for identification when reading from flash */
uint32_t magic_start;