]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: imx: add basic imx6sx SoC support
authorShawn Guo <shawn.guo@freescale.com>
Tue, 13 May 2014 13:46:16 +0000 (21:46 +0800)
committerShawn Guo <shawn.guo@freescale.com>
Fri, 16 May 2014 07:35:25 +0000 (15:35 +0800)
Add basic suppport for i.MX6 SoloX SoC.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/mach-imx6sx.c [new file with mode: 0644]
arch/arm/mach-imx/mxc.h

index 839ef51fd3906e01aad91d33d5396c3ce48d10f3..4776e1ffacd578c06536b9e400937b23c52f5451 100644 (file)
@@ -763,6 +763,14 @@ config SOC_IMX6SL
        help
          This enables support for Freescale i.MX6 SoloLite processor.
 
+config SOC_IMX6SX
+       bool "i.MX6 SoloX support"
+       select PINCTRL_IMX6SX
+       select SOC_IMX6
+
+       help
+         This enables support for Freescale i.MX6 SoloX processor.
+
 config SOC_VF610
        bool "Vybrid Family VF610 support"
        select ARM_GIC
index 572e1ab02c1450d0c66915fa73dcf11ff82e24a6..bbe93bbfd0034ff2b3e01ee5653073a5c4878bba 100644 (file)
@@ -101,6 +101,7 @@ obj-$(CONFIG_SMP) += headsmp.o platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
 obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
 obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o
+obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o
 
 ifeq ($(CONFIG_SUSPEND),y)
 AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
index ba3b498a67ecc47e78198d756b21aa6197f46ebc..bbe8ff1f0412ed2609c82408ef67fc8b16604a81 100644 (file)
@@ -111,6 +111,9 @@ struct device * __init imx_soc_device_init(void)
        case MXC_CPU_IMX6DL:
                soc_id = "i.MX6DL";
                break;
+       case MXC_CPU_IMX6SX:
+               soc_id = "i.MX6SX";
+               break;
        case MXC_CPU_IMX6Q:
                soc_id = "i.MX6Q";
                break;
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
new file mode 100644 (file)
index 0000000..02fccf6
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * 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/irqchip.h>
+#include <linux/of_platform.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include "common.h"
+
+static void __init imx6sx_init_machine(void)
+{
+       struct device *parent;
+
+       mxc_arch_reset_init_dt();
+
+       parent = imx_soc_device_init();
+       if (parent == NULL)
+               pr_warn("failed to initialize soc device\n");
+
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+
+       imx_anatop_init();
+}
+
+static void __init imx6sx_init_irq(void)
+{
+       imx_init_revision_from_anatop();
+       imx_init_l2cache();
+       imx_src_init();
+       imx_gpc_init();
+       irqchip_init();
+}
+
+static const char *imx6sx_dt_compat[] __initconst = {
+       "fsl,imx6sx",
+       NULL,
+};
+
+DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
+       .map_io         = debug_ll_io_init,
+       .init_irq       = imx6sx_init_irq,
+       .init_machine   = imx6sx_init_machine,
+       .dt_compat      = imx6sx_dt_compat,
+       .restart        = mxc_restart,
+MACHINE_END
index b08ab3ad4a6db2d09d4344ef0e319b8bc8a64cf1..75d6a37e1ae490f3603ac84b19369f6d3204a139 100644 (file)
@@ -36,6 +36,7 @@
 #define MXC_CPU_MX53           53
 #define MXC_CPU_IMX6SL         0x60
 #define MXC_CPU_IMX6DL         0x61
+#define MXC_CPU_IMX6SX         0x62
 #define MXC_CPU_IMX6Q          0x63
 
 #define IMX_CHIP_REVISION_1_0          0x10
@@ -163,6 +164,11 @@ static inline bool cpu_is_imx6dl(void)
        return __mxc_cpu_type == MXC_CPU_IMX6DL;
 }
 
+static inline bool cpu_is_imx6sx(void)
+{
+       return __mxc_cpu_type == MXC_CPU_IMX6SX;
+}
+
 static inline bool cpu_is_imx6q(void)
 {
        return __mxc_cpu_type == MXC_CPU_IMX6Q;