Release 4.9 arch/arm/mach-ux500/platsmp.c
/*
* Copyright (C) 2002 ARM Ltd.
* Copyright (C) 2008 STMicroelctronics.
* Copyright (C) 2009 ST-Ericsson.
* Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
*
* This file is based on arm realview platform
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/smp.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <asm/cacheflush.h>
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>
#include "setup.h"
#include "db8500-regs.h"
/* Magic triggers in backup RAM */
#define UX500_CPU1_JUMPADDR_OFFSET 0x1FF4
#define UX500_CPU1_WAKEMAGIC_OFFSET 0x1FF0
static void wakeup_secondary(void)
{
struct device_node *np;
static void __iomem *backupram;
np = of_find_compatible_node(NULL, NULL, "ste,dbx500-backupram");
if (!np) {
pr_err("No backupram base address\n");
return;
}
backupram = of_iomap(np, 0);
of_node_put(np);
if (!backupram) {
pr_err("No backupram remap\n");
return;
}
/*
* write the address of secondary startup into the backup ram register
* at offset 0x1FF4, then write the magic number 0xA1FEED01 to the
* backup ram register at offset 0x1FF0, which is what boot rom code
* is waiting for. This will wake up the secondary core from WFE.
*/
writel(virt_to_phys(secondary_startup),
backupram + UX500_CPU1_JUMPADDR_OFFSET);
writel(0xA1FEED01,
backupram + UX500_CPU1_WAKEMAGIC_OFFSET);
/* make sure write buffer is drained */
mb();
iounmap(backupram);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 56 | 55.45% | 2 | 25.00% |
srinidhi kasagar | srinidhi kasagar | 36 | 35.64% | 2 | 25.00% |
rabin vincent | rabin vincent | 4 | 3.96% | 1 | 12.50% |
sundar iyer | sundar iyer | 2 | 1.98% | 1 | 12.50% |
will deacon | will deacon | 2 | 1.98% | 1 | 12.50% |
russell king | russell king | 1 | 0.99% | 1 | 12.50% |
| Total | 101 | 100.00% | 8 | 100.00% |
static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
{
struct device_node *np;
static void __iomem *scu_base;
unsigned int ncores;
int i;
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
if (!np) {
pr_err("No SCU base address\n");
return;
}
scu_base = of_iomap(np, 0);
of_node_put(np);
if (!scu_base) {
pr_err("No SCU remap\n");
return;
}
scu_enable(scu_base);
ncores = scu_get_core_count(scu_base);
for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
iounmap(scu_base);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 82 | 70.09% | 3 | 33.33% |
srinidhi kasagar | srinidhi kasagar | 25 | 21.37% | 1 | 11.11% |
russell king | russell king | 8 | 6.84% | 3 | 33.33% |
marc zyngier | marc zyngier | 1 | 0.85% | 1 | 11.11% |
rabin vincent | rabin vincent | 1 | 0.85% | 1 | 11.11% |
| Total | 117 | 100.00% | 9 | 100.00% |
static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
wakeup_secondary();
arch_send_wakeup_ipi_mask(cpumask_of(cpu));
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 19 | 65.52% | 1 | 33.33% |
srinidhi kasagar | srinidhi kasagar | 9 | 31.03% | 1 | 33.33% |
marc zyngier | marc zyngier | 1 | 3.45% | 1 | 33.33% |
| Total | 29 | 100.00% | 3 | 100.00% |
static const struct smp_operations ux500_smp_ops __initconst = {
.smp_prepare_cpus = ux500_smp_prepare_cpus,
.smp_boot_secondary = ux500_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU
.cpu_die = ux500_cpu_die,
#endif
};
CPU_METHOD_OF_DECLARE(ux500_smp, "ste,dbx500-smp", &ux500_smp_ops);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 183 | 54.46% | 4 | 22.22% |
srinidhi kasagar | srinidhi kasagar | 94 | 27.98% | 2 | 11.11% |
marc zyngier | marc zyngier | 29 | 8.63% | 1 | 5.56% |
russell king | russell king | 11 | 3.27% | 4 | 22.22% |
rabin vincent | rabin vincent | 7 | 2.08% | 1 | 5.56% |
will deacon | will deacon | 5 | 1.49% | 2 | 11.11% |
masahiro yamada | masahiro yamada | 3 | 0.89% | 1 | 5.56% |
sundar iyer | sundar iyer | 2 | 0.60% | 1 | 5.56% |
rob herring | rob herring | 1 | 0.30% | 1 | 5.56% |
arnd bergmann | arnd bergmann | 1 | 0.30% | 1 | 5.56% |
| Total | 336 | 100.00% | 18 | 100.00% |