aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/Kconfig1
-rw-r--r--arch/arm/mach-imx/Makefile6
-rw-r--r--arch/arm/mach-imx/head-v7.S15
-rw-r--r--arch/arm/mach-imx/pm-imx6q.c2
4 files changed, 19 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index c44aa974e79c..0929768573ba 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -595,6 +595,7 @@ comment "i.MX6 family:"
595 595
596config SOC_IMX6Q 596config SOC_IMX6Q
597 bool "i.MX6 Quad support" 597 bool "i.MX6 Quad support"
598 select ARM_CPU_SUSPEND if PM
598 select ARM_GIC 599 select ARM_GIC
599 select CACHE_L2X0 600 select CACHE_L2X0
600 select CPU_V7 601 select CPU_V7
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index aba73214c2a8..7a739bb5915e 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -70,4 +70,8 @@ AFLAGS_head-v7.o :=-Wa,-march=armv7-a
70obj-$(CONFIG_SMP) += platsmp.o 70obj-$(CONFIG_SMP) += platsmp.o
71obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 71obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
72obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o 72obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
73obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o pm-imx6q.o 73obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o
74
75ifeq ($(CONFIG_PM),y)
76obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o
77endif
diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/head-v7.S
index 914f2a14c65e..7e49deb128a4 100644
--- a/arch/arm/mach-imx/head-v7.S
+++ b/arch/arm/mach-imx/head-v7.S
@@ -71,6 +71,7 @@ ENTRY(v7_secondary_startup)
71ENDPROC(v7_secondary_startup) 71ENDPROC(v7_secondary_startup)
72#endif 72#endif
73 73
74#ifdef CONFIG_PM
74/* 75/*
75 * The following code is located into the .data section. This is to 76 * The following code is located into the .data section. This is to
76 * allow phys_l2x0_saved_regs to be accessed with a relative load 77 * allow phys_l2x0_saved_regs to be accessed with a relative load
@@ -79,6 +80,7 @@ ENDPROC(v7_secondary_startup)
79 .data 80 .data
80 .align 81 .align
81 82
83#ifdef CONFIG_CACHE_L2X0
82 .macro pl310_resume 84 .macro pl310_resume
83 ldr r2, phys_l2x0_saved_regs 85 ldr r2, phys_l2x0_saved_regs
84 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0 86 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0
@@ -88,12 +90,17 @@ ENDPROC(v7_secondary_startup)
88 str r1, [r0, #L2X0_CTRL] @ re-enable L2 90 str r1, [r0, #L2X0_CTRL] @ re-enable L2
89 .endm 91 .endm
90 92
93 .globl phys_l2x0_saved_regs
94phys_l2x0_saved_regs:
95 .long 0
96#else
97 .macro pl310_resume
98 .endm
99#endif
100
91ENTRY(v7_cpu_resume) 101ENTRY(v7_cpu_resume)
92 bl v7_invalidate_l1 102 bl v7_invalidate_l1
93 pl310_resume 103 pl310_resume
94 b cpu_resume 104 b cpu_resume
95ENDPROC(v7_cpu_resume) 105ENDPROC(v7_cpu_resume)
96 106#endif
97 .globl phys_l2x0_saved_regs
98phys_l2x0_saved_regs:
99 .long 0
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
index f20f191d7cca..f7b0c2b1b905 100644
--- a/arch/arm/mach-imx/pm-imx6q.c
+++ b/arch/arm/mach-imx/pm-imx6q.c
@@ -64,7 +64,9 @@ void __init imx6q_pm_init(void)
64 * address of the data structure used by l2x0 core to save registers, 64 * address of the data structure used by l2x0 core to save registers,
65 * and later restore the necessary ones in imx6q resume entry. 65 * and later restore the necessary ones in imx6q resume entry.
66 */ 66 */
67#ifdef CONFIG_CACHE_L2X0
67 phys_l2x0_saved_regs = __pa(&l2x0_saved_regs); 68 phys_l2x0_saved_regs = __pa(&l2x0_saved_regs);
69#endif
68 70
69 suspend_set_ops(&imx6q_pm_ops); 71 suspend_set_ops(&imx6q_pm_ops);
70} 72}