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

Change-Id: I5415001eddfa121dc580a8cb525e383a6fe0f7c2
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
This commit is contained in:
Antony Arun T 2019-09-10 18:21:08 +05:30 committed by Gerrit - the friendly Code Review server
parent 75ec5dacf5
commit 5594635943
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;
}