aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2019-09-17 17:15:40 -0400
committerTom Rini <trini@konsulko.com>2019-10-04 12:21:23 -0400
commit29c9db4d98711606c48d130f328f848fa7adae55 (patch)
tree756a8525e6feba9ca563b09531732e6f8ec327ab /arch/arm/mach-k3
parentdd2d9899720895881e5c60fb38f91f22c53c97cc (diff)
downloadu-boot-29c9db4d98711606c48d130f328f848fa7adae55.zip
u-boot-29c9db4d98711606c48d130f328f848fa7adae55.tar.gz
u-boot-29c9db4d98711606c48d130f328f848fa7adae55.tar.bz2
board: ti: am654: Disable TRNG node for HS devices
On HS devices the access to TRNG is restricted on the non-secure ARM side, disable the node in DT to prevent firewall violations. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-k3')
-rw-r--r--arch/arm/mach-k3/common.c20
-rw-r--r--arch/arm/mach-k3/include/mach/sys_proto.h2
2 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 3e36d90..c16afc6 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -137,6 +137,26 @@ int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name)
return 0;
}
+
+int fdt_disable_node(void *blob, char *node_path)
+{
+ int offs;
+ int ret;
+
+ offs = fdt_path_offset(blob, node_path);
+ if (offs < 0) {
+ debug("Node %s not found.\n", node_path);
+ return 0;
+ }
+ ret = fdt_setprop_string(blob, offs, "status", "disabled");
+ if (ret < 0) {
+ printf("Could not add status property to node %s: %s\n",
+ node_path, fdt_strerror(ret));
+ return ret;
+ }
+ return 0;
+}
+
#endif
#ifndef CONFIG_SYSRESET
diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h
index 45832b4..3c825aa 100644
--- a/arch/arm/mach-k3/include/mach/sys_proto.h
+++ b/arch/arm/mach-k3/include/mach/sys_proto.h
@@ -14,4 +14,6 @@ struct ti_sci_handle *get_ti_sci_handle(void);
int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name);
int do_board_detect(void);
void release_resources_for_core_shutdown(void);
+int fdt_disable_node(void *blob, char *node_path);
+
#endif