mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq5018: Add multicore support
This features allow to execute task on core 1. This features not enable in tiny u-boot Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org> Change-Id: I986e7e3af840fd627dc5b6675931b79ab24ecb33
This commit is contained in:
parent
f5b08fbe9e
commit
d760f30afe
2 changed files with 38 additions and 0 deletions
|
|
@ -1658,3 +1658,33 @@ void fdt_fixup_set_dload_warm_reset(void *blob)
|
|||
if (ret)
|
||||
printf("fixup_set_dload: 'dload_warm_reset' not set");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP_CMD_SUPPORT
|
||||
int is_secondary_core_off(unsigned int cpuid)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = __invoke_psci_fn_smc(ARM_PSCI_TZ_FN_AFFINITY_INFO, cpuid, 0, 0);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void bring_secondary_core_down(unsigned int state)
|
||||
{
|
||||
__invoke_psci_fn_smc(ARM_PSCI_TZ_FN_CPU_OFF, state, 0, 0);
|
||||
}
|
||||
|
||||
int bring_sec_core_up(unsigned int cpuid, unsigned int entry, unsigned int arg)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = __invoke_psci_fn_smc(ARM_PSCI_TZ_FN_CPU_ON, cpuid, entry, arg);
|
||||
if (err) {
|
||||
printf("Enabling CPU%d via psci failed!\n", cpuid);
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Enabled CPU%d via psci successfully!\n", cpuid);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -323,6 +323,10 @@ extern loff_t board_env_size;
|
|||
#ifndef CONFIG_IPQ_TINY
|
||||
#define CONFIG_CMD_BOOTZ
|
||||
#define CONFIG_CMD_CACHE
|
||||
/*
|
||||
* Multicore CPU support
|
||||
*/
|
||||
#define CONFIG_SMP_CMD_SUPPORT
|
||||
#endif
|
||||
|
||||
#define CONFIG_FDT_FIXUP_PARTITIONS
|
||||
|
|
@ -389,4 +393,8 @@ extern loff_t board_env_size;
|
|||
#undef CONFIG_ZLIB
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP_CMD_SUPPORT
|
||||
#define NR_CPUS 2
|
||||
#endif
|
||||
|
||||
#endif /* _IPQ5018_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue