Merge "ipq5018: Add warm-reset dload fdt fixup"

This commit is contained in:
Linux Build Service Account 2020-06-30 07:40:31 -07:00 committed by Gerrit - the friendly Code Review server
commit 70969ebd61

View file

@ -1638,3 +1638,26 @@ void run_tzt(void *address)
{
execute_tzt(address);
}
void fdt_fixup_set_dload_warm_reset(void *blob)
{
int nodeoff, ret;
uint32_t setval = 1;
nodeoff = fdt_path_offset(blob, "/soc/qca,scm_restart_reason");
if (nodeoff < 0) {
nodeoff = fdt_path_offset(blob, "/qti,scm_restart_reason");
if (nodeoff < 0) {
printf("fixup_set_dload: unable to find scm_restart_reason node\n");
return;
}
}
ret = fdt_setprop_u32(blob, nodeoff, "dload_status", setval);
if (ret)
printf("fixup_set_dload: 'dload_status' not set");
ret = fdt_setprop_u32(blob, nodeoff, "dload_warm_reset", setval);
if (ret)
printf("fixup_set_dload: 'dload_warm_reset' not set");
}