Merge "ipq6018: Disable secure pil if 'aft' env variable is set"

This commit is contained in:
Linux Build Service Account 2019-09-17 14:41:00 -07:00 committed by Gerrit - the friendly Code Review server
commit 0a17e06f1e
2 changed files with 38 additions and 1 deletions

View file

@ -521,6 +521,11 @@ __weak void fdt_fixup_set_qca_cold_reboot_enable(void *blob)
return;
}
__weak void fdt_fixup_del_qca_secure_prop(void *blob)
{
return;
}
/*
* For newer kernel that boot with device tree (3.14+), all of memory is
* described in the /memory node, including areas that the kernel should not be
@ -628,8 +633,10 @@ int ft_board_setup(void *blob, bd_t *bd)
if (s)
fdt_fixup_set_qce_fixed_key(blob);
s = getenv("atf");
if (s)
if (s) {
fdt_fixup_set_qca_cold_reboot_enable(blob);
fdt_fixup_del_qca_secure_prop(blob);
}
#ifdef CONFIG_QCA_MMC
board_mmc_deinit();

View file

@ -1373,3 +1373,33 @@ void fdt_fixup_set_qca_cold_reboot_enable(void *blob)
return;
}
void fdt_fixup_del_qca_secure_prop(void *blob)
{
int nodeoff, ret;
char *node;
node = "/soc/q6v5_wcss@CD00000";
nodeoff = fdt_path_offset(blob, node);
if (nodeoff < 0) {
printf("fixup_del_qca_secure: unable to find node '%s'\n",node);
return;
}
ret = fdt_delprop(blob, nodeoff, "qca,secure");
if (ret)
printf("fixup_del_qca_secure:cannot delete property in '%s'\n",node);
node = "/soc/q6v6_adsp@AB00000";
nodeoff = fdt_path_offset(blob, node);
if (nodeoff < 0) {
printf("fixup_del_qca_secure: unable to find node '%s'\n",node);
return;
}
ret = fdt_delprop(blob, nodeoff, "qca,secure");
if (ret)
printf("fixup_del_qca_secure:cannot delete property in '%s'\n",node);
return;
}