-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
armv7R: K3: am654: Add support to start ATF from R5 SPL
Considering the boot time requirements, Cortex-A core should be able to start immediately after SPL on R5. Add support for the same. Reviewed-by: Tom Rini <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]>
- Loading branch information
1 parent
890b2e7
commit a3501a4
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
/* | ||
* K3: Common Architecture initialization | ||
* | ||
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ | ||
* Lokesh Vutla <[email protected]> | ||
*/ | ||
|
||
#include <common.h> | ||
#include <spl.h> | ||
#include "common.h" | ||
#include <dm.h> | ||
#include <remoteproc.h> | ||
|
||
#ifdef CONFIG_SYS_K3_SPL_ATF | ||
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) | ||
{ | ||
int ret; | ||
|
||
/* | ||
* It is assumed that remoteproc device 1 is the corresponding | ||
* cortex A core which runs ATF. Make sure DT reflects the same. | ||
*/ | ||
ret = rproc_dev_init(1); | ||
if (ret) { | ||
printf("%s: ATF failed to Initialize on rproc: ret= %d\n", | ||
__func__, ret); | ||
hang(); | ||
} | ||
|
||
ret = rproc_load(1, spl_image->entry_point, 0x200); | ||
if (ret) { | ||
printf("%s: ATF failed to load on rproc: ret= %d\n", | ||
__func__, ret); | ||
hang(); | ||
} | ||
|
||
/* Add an extra newline to differentiate the ATF logs from SPL*/ | ||
printf("Starting ATF on ARM64 core...\n\n"); | ||
|
||
ret = rproc_start(1); | ||
if (ret) { | ||
printf("%s: ATF failed to start on rproc: ret= %d\n", | ||
__func__, ret); | ||
hang(); | ||
} | ||
|
||
debug("ATF started. Wait indefiniely\n"); | ||
while (1) | ||
asm volatile("wfe"); | ||
} | ||
#endif |