~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-shmobile/smp-r8a7791.c

Version: ~ [ linux-5.11 ] ~ [ linux-5.10.17 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.99 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.176 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.221 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.257 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.257 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * SMP support for r8a7791
  3  *
  4  * Copyright (C) 2013 Renesas Solutions Corp.
  5  * Copyright (C) 2013 Magnus Damm
  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>
 20 
 21 #include <asm/smp_plat.h>
 22 
 23 #include "common.h"
 24 #include "platsmp-apmu.h"
 25 #include "r8a7791.h"
 26 #include "rcar-gen2.h"
 27 
 28 static struct rcar_apmu_config r8a7791_apmu_config[] = {
 29         {
 30                 .iomem = DEFINE_RES_MEM(0xe6152000, 0x188),
 31                 .cpus = { 0, 1 },
 32         }
 33 };
 34 
 35 static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
 36 {
 37         /* let APMU code install data related to shmobile_boot_vector */
 38         shmobile_smp_apmu_prepare_cpus(max_cpus,
 39                                        r8a7791_apmu_config,
 40                                        ARRAY_SIZE(r8a7791_apmu_config));
 41 
 42         rcar_gen2_pm_init();
 43 }
 44 
 45 static int r8a7791_smp_boot_secondary(unsigned int cpu,
 46                                       struct task_struct *idle)
 47 {
 48         /* Error out when hardware debug mode is enabled */
 49         if (rcar_gen2_read_mode_pins() & BIT(21)) {
 50                 pr_warn("Unable to boot CPU%u when MD21 is set\n", cpu);
 51                 return -ENOTSUPP;
 52         }
 53 
 54         return shmobile_smp_apmu_boot_secondary(cpu, idle);
 55 }
 56 
 57 const struct smp_operations r8a7791_smp_ops __initconst = {
 58         .smp_prepare_cpus       = r8a7791_smp_prepare_cpus,
 59         .smp_boot_secondary     = r8a7791_smp_boot_secondary,
 60 #ifdef CONFIG_HOTPLUG_CPU
 61         .cpu_can_disable        = shmobile_smp_cpu_can_disable,
 62         .cpu_die                = shmobile_smp_apmu_cpu_die,
 63         .cpu_kill               = shmobile_smp_apmu_cpu_kill,
 64 #endif
 65 };
 66 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp