aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3/common.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2019-03-08 11:47:33 +0530
committerTom Rini <trini@konsulko.com>2019-04-12 08:05:51 -0400
commit6ce424a92022283db31f6ea278eea0d13c67777f (patch)
tree4453f9b70b2a0ffab9c2f34389e949f9fb0aa161 /arch/arm/mach-k3/common.c
parent826eb74015fafda92f1fd35e91aeec76a8099539 (diff)
downloadu-boot-6ce424a92022283db31f6ea278eea0d13c67777f.zip
u-boot-6ce424a92022283db31f6ea278eea0d13c67777f.tar.gz
u-boot-6ce424a92022283db31f6ea278eea0d13c67777f.tar.bz2
arm: k3: Add a wrapper to get tisci handle
Create a wrapper to get the ti sci handle. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-k3/common.c')
-rw-r--r--arch/arm/mach-k3/common.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 5909bbf..23cd37c 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -11,6 +11,19 @@
#include "common.h"
#include <dm.h>
#include <remoteproc.h>
+#include <linux/soc/ti/ti_sci_protocol.h>
+
+struct ti_sci_handle *get_ti_sci_handle(void)
+{
+ struct udevice *dev;
+ int ret;
+
+ ret = uclass_get_device_by_name(UCLASS_FIRMWARE, "dmsc", &dev);
+ if (ret)
+ panic("Failed to get SYSFW (%d)\n", ret);
+
+ return (struct ti_sci_handle *)ti_sci_get_handle_from_sysfw(dev);
+}
#ifdef CONFIG_SYS_K3_SPL_ATF
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)