arm: mach-k3: common: Clean up ATF image startup function

Perform some cosmetic cleanup of the ATF image startup function, namely
fixing a spelling mistake, capitalization of a few words, spacing, as
well aligning how errors are printed and as using panic() for cases that
were using a combination of printf() + hang().

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
This commit is contained in:
Andreas Dannenberg 2019-02-04 12:58:47 -06:00 committed by Tom Rini
parent eefc01d590
commit 4a1fa524e9

View file

@ -19,33 +19,25 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
/* /*
* It is assumed that remoteproc device 1 is the corresponding * It is assumed that remoteproc device 1 is the corresponding
* cortex A core which runs ATF. Make sure DT reflects the same. * Cortex-A core which runs ATF. Make sure DT reflects the same.
*/ */
ret = rproc_dev_init(1); ret = rproc_dev_init(1);
if (ret) { if (ret)
printf("%s: ATF failed to Initialize on rproc: ret= %d\n", panic("%s: ATF failed to initialize on rproc (%d)\n", __func__,
__func__, ret); ret);
hang();
}
ret = rproc_load(1, spl_image->entry_point, 0x200); ret = rproc_load(1, spl_image->entry_point, 0x200);
if (ret) { if (ret)
printf("%s: ATF failed to load on rproc: ret= %d\n", panic("%s: ATF failed to load on rproc (%d)\n", __func__, ret);
__func__, ret);
hang();
}
/* Add an extra newline to differentiate the ATF logs from SPL*/ /* Add an extra newline to differentiate the ATF logs from SPL */
printf("Starting ATF on ARM64 core...\n\n"); printf("Starting ATF on ARM64 core...\n\n");
ret = rproc_start(1); ret = rproc_start(1);
if (ret) { if (ret)
printf("%s: ATF failed to start on rproc: ret= %d\n", panic("%s: ATF failed to start on rproc (%d)\n", __func__, ret);
__func__, ret);
hang();
}
debug("ATF started. Wait indefiniely\n"); debug("ATF started. Waiting indefinitely...\n");
while (1) while (1)
asm volatile("wfe"); asm volatile("wfe");
} }