summaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3/am6_init.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2019-09-09 12:47:38 +0530
committerTom Rini <trini@konsulko.com>2019-09-13 11:56:30 -0400
commit78e512129b48023be5926ee494e35606a47cb5be (patch)
treebecf22d8f0a6b48bd1cfcd0e7dd9af3123b33a9b /arch/arm/mach-k3/am6_init.c
parente8d3a186394893e6ee212be89c64e288109d28f1 (diff)
arm: k3: Use get_ti_sci_handle() where ever possible
Instead of calling uclass apis everywhere, use get_ti_sci_handle() when ever ti_sci is needed. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-k3/am6_init.c')
-rw-r--r--arch/arm/mach-k3/am6_init.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index 6558fe0ef4..0b564f7bd1 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -219,10 +219,9 @@ u32 spl_boot_device(void)
void release_resources_for_core_shutdown(void)
{
- struct udevice *dev;
- struct ti_sci_handle *ti_sci;
- struct ti_sci_dev_ops *dev_ops;
- struct ti_sci_proc_ops *proc_ops;
+ struct ti_sci_handle *ti_sci = get_ti_sci_handle();
+ struct ti_sci_dev_ops *dev_ops = &ti_sci->ops.dev_ops;
+ struct ti_sci_proc_ops *proc_ops = &ti_sci->ops.proc_ops;
int ret;
u32 i;
@@ -231,15 +230,6 @@ void release_resources_for_core_shutdown(void)
AM6_DEV_MCU_RTI1,
};
- /* Get handle to Device Management and Security Controller (SYSFW) */
- ret = uclass_get_device_by_name(UCLASS_FIRMWARE, "dmsc", &dev);
- if (ret)
- panic("Failed to get handle to SYSFW (%d)\n", ret);
-
- ti_sci = (struct ti_sci_handle *)(ti_sci_get_handle_from_sysfw(dev));
- dev_ops = &ti_sci->ops.dev_ops;
- proc_ops = &ti_sci->ops.proc_ops;
-
/* Iterate through list of devices to put (shutdown) */
for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) {
u32 id = put_device_ids[i];