blob: 14378e3fef16309f2da2bb91ae6e558972bde938 [file] [log] [blame]
Santosh Shilimkarf07cb6a2013-06-10 12:20:17 -04001/*
2 * Keystone SOC SMP platform code
3 *
4 * Copyright 2013 Texas Instruments, Inc.
5 * Cyril Chemparathy <cyril@ti.com>
6 * Santosh Shilimkar <santosh.shillimkar@ti.com>
7 *
8 * Based on platsmp.c, Copyright (C) 2002 ARM Ltd.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms and conditions of the GNU General Public License,
12 * version 2, as published by the Free Software Foundation.
13 */
14
15#include <linux/init.h>
16#include <linux/smp.h>
17#include <linux/io.h>
18
19#include <asm/smp_plat.h>
20#include <asm/prom.h>
21
22#include "keystone.h"
23
Paul Gortmaker8bd26e32013-06-17 15:43:14 -040024static int keystone_smp_boot_secondary(unsigned int cpu,
Santosh Shilimkarf07cb6a2013-06-10 12:20:17 -040025 struct task_struct *idle)
26{
27 unsigned long start = virt_to_phys(&secondary_startup);
28 int error;
29
30 pr_debug("keystone-smp: booting cpu %d, vector %08lx\n",
31 cpu, start);
32
Santosh Shilimkar3aae7ab2013-06-21 18:54:47 -040033 error = keystone_cpu_smc(KEYSTONE_MON_CPU_UP_IDX, cpu, start);
34 if (error)
35 pr_err("CPU %d bringup failed with %d\n", cpu, error);
Santosh Shilimkarf07cb6a2013-06-10 12:20:17 -040036
37 return error;
38}
39
40struct smp_operations keystone_smp_ops __initdata = {
41 .smp_init_cpus = arm_dt_init_cpu_maps,
42 .smp_boot_secondary = keystone_smp_boot_secondary,
43};