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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-imx/mach-vf610.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /*
  3  * Copyright 2012-2013 Freescale Semiconductor, Inc.
  4  */
  5 
  6 #include <linux/of_address.h>
  7 #include <linux/of_platform.h>
  8 #include <linux/io.h>
  9 
 10 #include <linux/irqchip.h>
 11 #include <asm/mach/arch.h>
 12 #include <asm/hardware/cache-l2x0.h>
 13 
 14 #include "common.h"
 15 #include "hardware.h"
 16 
 17 #define MSCM_CPxCOUNT           0x00c
 18 #define MSCM_CPxCFG1            0x014
 19 
 20 static void __init vf610_detect_cpu(void)
 21 {
 22         struct device_node *np;
 23         u32 cpxcount, cpxcfg1;
 24         unsigned int cpu_type;
 25         void __iomem *mscm;
 26 
 27         np = of_find_compatible_node(NULL, NULL, "fsl,vf610-mscm-cpucfg");
 28         if (WARN_ON(!np))
 29                 return;
 30 
 31         mscm = of_iomap(np, 0);
 32         of_node_put(np);
 33 
 34         if (WARN_ON(!mscm))
 35                 return;
 36 
 37         cpxcount = readl_relaxed(mscm + MSCM_CPxCOUNT);
 38         cpxcfg1  = readl_relaxed(mscm + MSCM_CPxCFG1);
 39 
 40         iounmap(mscm);
 41 
 42         cpu_type = cpxcount ? MXC_CPU_VF600 : MXC_CPU_VF500;
 43 
 44         if (cpxcfg1)
 45                 cpu_type |= MXC_CPU_VFx10;
 46 
 47         mxc_set_cpu_type(cpu_type);
 48 }
 49 
 50 static void __init vf610_init_machine(void)
 51 {
 52         vf610_detect_cpu();
 53 
 54         of_platform_default_populate(NULL, NULL, NULL);
 55 }
 56 
 57 static const char * const vf610_dt_compat[] __initconst = {
 58         "fsl,vf500",
 59         "fsl,vf510",
 60         "fsl,vf600",
 61         "fsl,vf610",
 62         "fsl,vf610m4",
 63         NULL,
 64 };
 65 
 66 DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF5xx/VF6xx (Device Tree)")
 67         .l2c_aux_val    = 0,
 68         .l2c_aux_mask   = ~0,
 69         .init_machine   = vf610_init_machine,
 70         .dt_compat      = vf610_dt_compat,
 71 MACHINE_END
 72 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php