diff options
-rw-r--r-- | arch/arm/mach-imx/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx6sl.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sl.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/mxc.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/pm-imx6q.c | 9 |
5 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 5383c589ad71..bbe1f5bb799c 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -102,6 +102,8 @@ obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o | |||
102 | 102 | ||
103 | ifeq ($(CONFIG_PM),y) | 103 | ifeq ($(CONFIG_PM),y) |
104 | obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o | 104 | obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o |
105 | # i.MX6SL reuses pm-imx6q.c | ||
106 | obj-$(CONFIG_SOC_IMX6SL) += pm-imx6q.o | ||
105 | endif | 107 | endif |
106 | 108 | ||
107 | # i.MX5 based machines | 109 | # i.MX5 based machines |
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c index a5c3c5d21aee..c0c4ef55e35b 100644 --- a/arch/arm/mach-imx/clk-imx6sl.c +++ b/arch/arm/mach-imx/clk-imx6sl.c | |||
@@ -127,6 +127,9 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
127 | base = of_iomap(np, 0); | 127 | base = of_iomap(np, 0); |
128 | WARN_ON(!base); | 128 | WARN_ON(!base); |
129 | 129 | ||
130 | /* Reuse imx6q pm code */ | ||
131 | imx6q_pm_set_ccm_base(base); | ||
132 | |||
130 | /* name reg shift width parent_names num_parents */ | 133 | /* name reg shift width parent_names num_parents */ |
131 | clks[IMX6SL_CLK_STEP] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels)); | 134 | clks[IMX6SL_CLK_STEP] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels)); |
132 | clks[IMX6SL_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); | 135 | clks[IMX6SL_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); |
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index f01aaabd3254..2f952e3fcf89 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c | |||
@@ -47,6 +47,9 @@ static void __init imx6sl_init_machine(void) | |||
47 | of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); | 47 | of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); |
48 | 48 | ||
49 | imx6sl_fec_init(); | 49 | imx6sl_fec_init(); |
50 | imx_anatop_init(); | ||
51 | /* Reuse imx6q pm code */ | ||
52 | imx6q_pm_init(); | ||
50 | } | 53 | } |
51 | 54 | ||
52 | static void __init imx6sl_init_irq(void) | 55 | static void __init imx6sl_init_irq(void) |
diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h index 99e03ea9bf79..b08ab3ad4a6d 100644 --- a/arch/arm/mach-imx/mxc.h +++ b/arch/arm/mach-imx/mxc.h | |||
@@ -153,6 +153,11 @@ extern unsigned int __mxc_cpu_type; | |||
153 | #endif | 153 | #endif |
154 | 154 | ||
155 | #ifndef __ASSEMBLY__ | 155 | #ifndef __ASSEMBLY__ |
156 | static inline bool cpu_is_imx6sl(void) | ||
157 | { | ||
158 | return __mxc_cpu_type == MXC_CPU_IMX6SL; | ||
159 | } | ||
160 | |||
156 | static inline bool cpu_is_imx6dl(void) | 161 | static inline bool cpu_is_imx6dl(void) |
157 | { | 162 | { |
158 | return __mxc_cpu_type == MXC_CPU_IMX6DL; | 163 | return __mxc_cpu_type == MXC_CPU_IMX6DL; |
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index f303b56f087c..aecd9f8037e0 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c | |||
@@ -144,6 +144,12 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
144 | val |= 0x3 << BP_CLPCR_STBY_COUNT; | 144 | val |= 0x3 << BP_CLPCR_STBY_COUNT; |
145 | val |= BM_CLPCR_VSTBY; | 145 | val |= BM_CLPCR_VSTBY; |
146 | val |= BM_CLPCR_SBYOS; | 146 | val |= BM_CLPCR_SBYOS; |
147 | if (cpu_is_imx6sl()) { | ||
148 | val |= BM_CLPCR_BYPASS_PMIC_READY; | ||
149 | val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; | ||
150 | } else { | ||
151 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; | ||
152 | } | ||
147 | break; | 153 | break; |
148 | default: | 154 | default: |
149 | return -EINVAL; | 155 | return -EINVAL; |
@@ -181,7 +187,8 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
181 | imx_set_cpu_jump(0, v7_cpu_resume); | 187 | imx_set_cpu_jump(0, v7_cpu_resume); |
182 | /* Zzz ... */ | 188 | /* Zzz ... */ |
183 | cpu_suspend(0, imx6q_suspend_finish); | 189 | cpu_suspend(0, imx6q_suspend_finish); |
184 | imx_smp_prepare(); | 190 | if (cpu_is_imx6q() || cpu_is_imx6dl()) |
191 | imx_smp_prepare(); | ||
185 | imx_anatop_post_resume(); | 192 | imx_anatop_post_resume(); |
186 | imx_gpc_post_resume(); | 193 | imx_gpc_post_resume(); |
187 | imx6q_enable_rbc(false); | 194 | imx6q_enable_rbc(false); |