1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2019 Lubomir Rintel <lkundrak@v3.sk>
6 #include <asm/smp_scu.h>
10 #define SW_BRANCH_VIRT_ADDR CIU_REG(0x24)
12 static int mmp3_boot_secondary(unsigned int cpu
, struct task_struct
*idle
)
15 * Apparently, the boot ROM on the second core spins on this
16 * register becoming non-zero and then jumps to the address written
17 * there. No IPIs involved.
19 __raw_writel(__pa_symbol(secondary_startup
), SW_BRANCH_VIRT_ADDR
);
23 static void mmp3_smp_prepare_cpus(unsigned int max_cpus
)
25 scu_enable(SCU_VIRT_BASE
);
28 static const struct smp_operations mmp3_smp_ops __initconst
= {
29 .smp_prepare_cpus
= mmp3_smp_prepare_cpus
,
30 .smp_boot_secondary
= mmp3_boot_secondary
,
32 CPU_METHOD_OF_DECLARE(mmp3_smp
, "marvell,mmp3-smp", &mmp3_smp_ops
);