Merge "runmulticore: Added secondary core status prints"
diff --git a/board/qca/arm/common/cmd_bootqca.c b/board/qca/arm/common/cmd_bootqca.c
index 94ecbcd..cedc698 100644
--- a/board/qca/arm/common/cmd_bootqca.c
+++ b/board/qca/arm/common/cmd_bootqca.c
@@ -71,7 +71,7 @@
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 @@
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();
}
diff --git a/board/qca/arm/ipq806x/ipq806x.c b/board/qca/arm/ipq806x/ipq806x.c
index 65a550a..e006ac4 100644
--- a/board/qca/arm/ipq806x/ipq806x.c
+++ b/board/qca/arm/ipq806x/ipq806x.c
@@ -922,12 +922,13 @@
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 @@
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 @@
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();
}