// SPDX-License-Identifier: GPL-2.0-or-later /* * Actions Semi Leopard * * This file is based on arm realview smp platform. * * Copyright 2012 Actions Semi Inc. * Author: Actions Semi, Inc. * * Copyright (c) 2017 Andreas Färber
*/
staticint s500_wakeup_secondary(unsignedint cpu)
{ int ret;
if (cpu > 3) return -EINVAL;
/* The generic PM domain driver is not available this early. */ switch (cpu) { case 2:
ret = owl_sps_set_pg(sps_base_addr,
OWL_SPS_PG_CTL_PWR_CPU2,
OWL_SPS_PG_CTL_ACK_CPU2, true); if (ret) return ret; break; case 3:
ret = owl_sps_set_pg(sps_base_addr,
OWL_SPS_PG_CTL_PWR_CPU3,
OWL_SPS_PG_CTL_ACK_CPU3, true); if (ret) return ret; break;
}
/* wait for CPUx to run to WFE instruction */
udelay(200);
sps_base_addr = of_iomap(node, 0); if (!sps_base_addr) {
pr_err("%s: could not map sps registers\n", __func__); return;
}
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); if (!node) {
pr_err("%s: missing scu\n", __func__); return;
}
scu_base_addr = of_iomap(node, 0); if (!scu_base_addr) {
pr_err("%s: could not map scu registers\n", __func__); return;
}
/* * While the number of cpus is gathered from dt, also get the * number of cores from the scu to verify this value when * booting the cores.
*/
ncores = scu_get_core_count(scu_base_addr);
pr_debug("%s: ncores %d\n", __func__, ncores);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.