X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Farm%2Fmach-k3%2Fsecurity.c;h=4e011ee10ef7038839c006eba92eaa915ac9d5fa;hb=2703d4b42dae40626ab511876f5a814ca01eae18;hp=52f49bf01fe2a1c360f920a885ec933e64c54b62;hpb=b4ee6daad7a2604ca9466b2ba48de86cc27d381f;p=oweals%2Fu-boot.git diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c index 52f49bf01f..4e011ee10e 100644 --- a/arch/arm/mach-k3/security.c +++ b/arch/arm/mach-k3/security.c @@ -11,25 +11,16 @@ #include #include #include +#include void board_fit_image_post_process(void **p_image, size_t *p_size) { - struct udevice *dev; - struct ti_sci_handle *ti_sci; - struct ti_sci_proc_ops *proc_ops; + struct ti_sci_handle *ti_sci = get_ti_sci_handle(); + struct ti_sci_proc_ops *proc_ops = &ti_sci->ops.proc_ops; u64 image_addr; u32 image_size; int ret; - /* Get handle to Device Management and Security Controller (SYSFW) */ - ret = uclass_get_device_by_name(UCLASS_FIRMWARE, "dmsc", &dev); - if (ret) { - printf("Failed to get handle to SYSFW (%d)\n", ret); - hang(); - } - ti_sci = (struct ti_sci_handle *)(ti_sci_get_handle_from_sysfw(dev)); - proc_ops = &ti_sci->ops.proc_ops; - image_addr = (uintptr_t)*p_image; debug("Authenticating image at address 0x%016llx\n", image_addr);