Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
[deliverable/linux.git] / arch / arm / mach-shmobile / smp-r8a7790.c
CommitLineData
ad09cb83
MD
1/*
2 * SMP support for r8a7790
3 *
4 * Copyright (C) 2012-2013 Renesas Solutions Corp.
5 * Copyright (C) 2012 Takashi Yoshii <takashi.yoshii.ze@renesas.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/smp.h>
19#include <linux/io.h>
fccae893 20
ad09cb83 21#include <asm/smp_plat.h>
fccae893 22
fd44aa5e 23#include "common.h"
a8d2ff39 24#include "platsmp-apmu.h"
585c09df 25#include "pm-rcar.h"
fccae893 26#include "r8a7790.h"
ad09cb83 27
c2c97ec5
KK
28static struct rcar_sysc_ch r8a7790_ca15_scu = {
29 .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */
30 .isr_bit = 12, /* CA15-SCU */
31};
32
0445ded6
GI
33static struct rcar_sysc_ch r8a7790_ca7_scu = {
34 .chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
35 .isr_bit = 21, /* CA7-SCU */
36};
37
a8d2ff39
HN
38static struct rcar_apmu_config r8a7790_apmu_config[] = {
39 {
40 .iomem = DEFINE_RES_MEM(0xe6152000, 0x88),
41 .cpus = { 0, 1, 2, 3 },
42 },
43 {
44 .iomem = DEFINE_RES_MEM(0xe6151000, 0x88),
45 .cpus = { 0x100, 0x0101, 0x102, 0x103 },
46 }
47};
48
ad09cb83
MD
49static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
50{
ad09cb83 51 /* let APMU code install data related to shmobile_boot_vector */
a8d2ff39
HN
52 shmobile_smp_apmu_prepare_cpus(max_cpus,
53 r8a7790_apmu_config,
54 ARRAY_SIZE(r8a7790_apmu_config));
ad09cb83 55
0445ded6
GI
56 /* turn on power to SCU */
57 r8a7790_pm_init();
c2c97ec5 58 rcar_sysc_power_up(&r8a7790_ca15_scu);
0445ded6 59 rcar_sysc_power_up(&r8a7790_ca7_scu);
ad09cb83
MD
60}
61
62struct smp_operations r8a7790_smp_ops __initdata = {
63 .smp_prepare_cpus = r8a7790_smp_prepare_cpus,
64 .smp_boot_secondary = shmobile_smp_apmu_boot_secondary,
65#ifdef CONFIG_HOTPLUG_CPU
66 .cpu_disable = shmobile_smp_cpu_disable,
67 .cpu_die = shmobile_smp_apmu_cpu_die,
68 .cpu_kill = shmobile_smp_apmu_cpu_kill,
69#endif
70};
This page took 0.082635 seconds and 5 git commands to generate.