diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-04-04 00:35:35 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-04-04 02:51:22 -0400 |
commit | 6b5756e8bd19f8f1f23386d41997d0309e7a82a6 (patch) | |
tree | db0b29a9071e7f079079ace3b2fa358c757374da /drivers/clk/samsung/clk-exynos4.c | |
parent | fb948f74ce05c5540f9ad7e92242e1c931f7c2f6 (diff) |
clk: exynos4: Add support for SoC-specific register save list
This patch extends suspend/resume support for SoC-specific registers to
handle differences in register sets on particular SoCs.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/clk/samsung/clk-exynos4.c')
-rw-r--r-- | drivers/clk/samsung/clk-exynos4.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index 23210006785b..17674da1c5f8 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c | |||
@@ -183,6 +183,26 @@ enum exynos4_clks { | |||
183 | * list of controller registers to be saved and restored during a | 183 | * list of controller registers to be saved and restored during a |
184 | * suspend/resume cycle. | 184 | * suspend/resume cycle. |
185 | */ | 185 | */ |
186 | static __initdata unsigned long exynos4210_clk_save[] = { | ||
187 | E4210_SRC_IMAGE, | ||
188 | E4210_SRC_LCD1, | ||
189 | E4210_SRC_MASK_LCD1, | ||
190 | E4210_DIV_LCD1, | ||
191 | E4210_GATE_IP_IMAGE, | ||
192 | E4210_GATE_IP_LCD1, | ||
193 | E4210_GATE_IP_PERIR, | ||
194 | E4210_MPLL_CON0, | ||
195 | }; | ||
196 | |||
197 | static __initdata unsigned long exynos4x12_clk_save[] = { | ||
198 | E4X12_GATE_IP_IMAGE, | ||
199 | E4X12_GATE_IP_PERIR, | ||
200 | E4X12_SRC_CAM1, | ||
201 | E4X12_DIV_ISP, | ||
202 | E4X12_DIV_CAM1, | ||
203 | E4X12_MPLL_CON0, | ||
204 | }; | ||
205 | |||
186 | static __initdata unsigned long exynos4_clk_regs[] = { | 206 | static __initdata unsigned long exynos4_clk_regs[] = { |
187 | SRC_LEFTBUS, | 207 | SRC_LEFTBUS, |
188 | DIV_LEFTBUS, | 208 | DIV_LEFTBUS, |
@@ -986,8 +1006,14 @@ void __init exynos4_clk_init(struct device_node *np) | |||
986 | panic("%s: unable to determine soc\n", __func__); | 1006 | panic("%s: unable to determine soc\n", __func__); |
987 | } | 1007 | } |
988 | 1008 | ||
989 | samsung_clk_init(np, reg_base, nr_clks, | 1009 | if (exynos4_soc == EXYNOS4210) |
990 | exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs)); | 1010 | samsung_clk_init(np, reg_base, nr_clks, |
1011 | exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs), | ||
1012 | exynos4210_clk_save, ARRAY_SIZE(exynos4210_clk_save)); | ||
1013 | else | ||
1014 | samsung_clk_init(np, reg_base, nr_clks, | ||
1015 | exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs), | ||
1016 | exynos4x12_clk_save, ARRAY_SIZE(exynos4x12_clk_save)); | ||
991 | 1017 | ||
992 | if (np) | 1018 | if (np) |
993 | samsung_clk_of_register_fixed_ext(exynos4_fixed_rate_ext_clks, | 1019 | samsung_clk_of_register_fixed_ext(exynos4_fixed_rate_ext_clks, |