mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-05 00:41:17 +01:00
ipq806x: Secondary core boot address gets decided dynamically
'forever' (Infinite while loop) function gets called in dump collection path. 'ak_secondary_cpu_init' function gets called in runmulticore path. Change-Id: Ie7bcf618fd6da5ce968954db538ae345c4f43d92 Signed-off-by: Vinoth Gnanasekaran <vgnana@codeaurora.org>
This commit is contained in:
parent
4459f567fa
commit
bb7513767e
2 changed files with 10 additions and 5 deletions
|
|
@ -71,7 +71,7 @@ kernel_img_info_t kernel_img_info;
|
|||
|
||||
char dtb_config_name[64];
|
||||
|
||||
__weak int scm_set_boot_addr(void)
|
||||
__weak int scm_set_boot_addr(bool enable_sec_core)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ static int do_dumpqca_data(void)
|
|||
dump_entries = dump_entries_s;
|
||||
}
|
||||
|
||||
if (scm_set_boot_addr() == 0) {
|
||||
if (scm_set_boot_addr(false) == 0) {
|
||||
/* Pull Core-1 out of reset, iff scm call succeeds */
|
||||
krait_release_secondary();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -922,12 +922,13 @@ int ipq_get_tz_version(char *version_name, int buf_size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void forever(void) { while (1); }
|
||||
extern void ak_secondary_cpu_init(void);
|
||||
extern void send_event(void);
|
||||
/*
|
||||
* Set the cold/warm boot address for one of the CPU cores.
|
||||
*/
|
||||
int scm_set_boot_addr(void)
|
||||
int scm_set_boot_addr(bool enable_sec_core)
|
||||
{
|
||||
int ret;
|
||||
struct {
|
||||
|
|
@ -935,7 +936,11 @@ int scm_set_boot_addr(void)
|
|||
unsigned long addr;
|
||||
} cmd;
|
||||
|
||||
cmd.addr = (unsigned long)ak_secondary_cpu_init;
|
||||
if (enable_sec_core)
|
||||
cmd.addr = (unsigned long)ak_secondary_cpu_init;
|
||||
else
|
||||
cmd.addr = (unsigned long)forever;
|
||||
|
||||
cmd.flags = SCM_FLAG_COLDBOOT_CPU1;
|
||||
|
||||
ret = scm_call(SCM_SVC_BOOT, SCM_BOOT_ADDR,
|
||||
|
|
@ -1034,7 +1039,7 @@ int bring_sec_core_up(unsigned int cpuid, unsigned int entry, unsigned int arg)
|
|||
dcache_old_status = dcache_status();
|
||||
if (!secondary_core_already_reset) {
|
||||
secondary_core_already_reset = 1;
|
||||
if (scm_set_boot_addr() == 0) {
|
||||
if (scm_set_boot_addr(true) == 0) {
|
||||
/* Pull Core-1 out of reset, iff scm call succeeds */
|
||||
krait_release_secondary();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue