Venkat Thogaru has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/67406 )
Change subject: sc7180: Fix for DDR-training-failure during warm reset with OTA ......................................................................
sc7180: Fix for DDR-training-failure during warm reset with OTA
Verify reboot type in case of OTA. If it is warmboot, will force for cold boot inorder to trigger DDR training
BUG=b:236990316 TEST=Validated on qualcomm sc7180 development board. Cold boot is triggered if current reboot is warmboot incase of OTA
Signed-off-by: Venkat Thogaru quic_thogaru@quicinc.com Change-Id: I908370662292d9f768d1ac89452775178e07fc78 --- M src/soc/qualcomm/common/qclib.c 1 file changed, 26 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/67406/1
diff --git a/src/soc/qualcomm/common/qclib.c b/src/soc/qualcomm/common/qclib.c index 90bcc20..b52c5cc 100644 --- a/src/soc/qualcomm/common/qclib.c +++ b/src/soc/qualcomm/common/qclib.c @@ -16,8 +16,10 @@ #include <security/vboot/misc.h> #include <vb2_api.h> #include <commonlib/bsd/mem_chip_info.h> +#include <include/reset.h>
#define QCLIB_VERSION 0 +#define DDR_FORCED_COLDBOOT 4
/* store QcLib return data until CBMEM_CREATION_HOOK runs */ static void *mem_chip_addr; @@ -276,6 +278,12 @@ mmu_restore_context(&pre_qclib_mmu_context); mmu_enable();
+ printk(BIOS_DEBUG, "\nReboot verify for OTA\n"); + if ((qclib_cb_if_table.global_attributes >> (DDR_FORCED_COLDBOOT - 1)) & (0x1)) { + printk(BIOS_DEBUG, "Rebooting Cold-Boot \n"); + board_reset(); + } + /* step through I/F table, handling return values */ for (i = 0; i < qclib_cb_if_table.num_entries; i++) if (qclib_cb_if_table.te[i].blob_attributes &