void mvebu_restart(enum reboot_mode mode, const char *cmd);
int mvebu_cpu_reset_deassert(int cpu);
+void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr);
void armada_xp_cpu_die(unsigned int cpu);
static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
+ int ret, hw_cpu;
+
pr_info("Booting CPU %d\n", cpu);
- armada_xp_boot_cpu(cpu, armada_xp_secondary_startup);
+ hw_cpu = cpu_logical_map(cpu);
+ mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_xp_secondary_startup);
+ ret = mvebu_cpu_reset_deassert(hw_cpu);
+ if (ret) {
+ pr_warn("unable to boot CPU: %d\n", ret);
+ return ret;
+ }
return 0;
}
{ /* end of list */ },
};
-static void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
+void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
{
writel(virt_to_phys(boot_addr), pmsu_mp_base +
PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu));
}
-#ifdef CONFIG_SMP
-int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr)
-{
- int hw_cpu, ret;
-
- if (!pmsu_mp_base) {
- pr_warn("Can't boot CPU. PMSU is uninitialized\n");
- return -ENODEV;
- }
-
- hw_cpu = cpu_logical_map(cpu_id);
-
- mvebu_pmsu_set_cpu_boot_addr(hw_cpu, boot_addr);
-
- ret = mvebu_cpu_reset_deassert(hw_cpu);
- if (ret) {
- pr_warn("unable to boot CPU: %d\n", ret);
- return ret;
- }
-
- return 0;
-}
-#endif
-
static int __init armada_370_xp_pmsu_init(void)
{
struct device_node *np;