aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/clk/samsung/clk-exynos4.c30
-rw-r--r--drivers/clk/samsung/clk-exynos5250.c3
-rw-r--r--drivers/clk/samsung/clk-exynos5440.c2
-rw-r--r--drivers/clk/samsung/clk.c9
-rw-r--r--drivers/clk/samsung/clk.h3
5 files changed, 39 insertions, 8 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 */
186static __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
197static __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
186static __initdata unsigned long exynos4_clk_regs[] = { 206static __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,
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c
index 115212525dd2..5cd9a0c47bf2 100644
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -477,7 +477,8 @@ void __init exynos5250_clk_init(struct device_node *np)
477 } 477 }
478 478
479 samsung_clk_init(np, reg_base, nr_clks, 479 samsung_clk_init(np, reg_base, nr_clks,
480 exynos5250_clk_regs, ARRAY_SIZE(exynos5250_clk_regs)); 480 exynos5250_clk_regs, ARRAY_SIZE(exynos5250_clk_regs),
481 NULL, 0);
481 samsung_clk_of_register_fixed_ext(exynos5250_fixed_rate_ext_clks, 482 samsung_clk_of_register_fixed_ext(exynos5250_fixed_rate_ext_clks,
482 ARRAY_SIZE(exynos5250_fixed_rate_ext_clks), 483 ARRAY_SIZE(exynos5250_fixed_rate_ext_clks),
483 ext_clk_match); 484 ext_clk_match);
diff --git a/drivers/clk/samsung/clk-exynos5440.c b/drivers/clk/samsung/clk-exynos5440.c
index d588e939c235..a0a094c06f19 100644
--- a/drivers/clk/samsung/clk-exynos5440.c
+++ b/drivers/clk/samsung/clk-exynos5440.c
@@ -115,7 +115,7 @@ void __init exynos5440_clk_init(struct device_node *np)
115 return; 115 return;
116 } 116 }
117 117
118 samsung_clk_init(np, reg_base, nr_clks, NULL, 0); 118 samsung_clk_init(np, reg_base, nr_clks, NULL, 0, NULL, 0);
119 samsung_clk_of_register_fixed_ext(exynos5440_fixed_rate_ext_clks, 119 samsung_clk_of_register_fixed_ext(exynos5440_fixed_rate_ext_clks,
120 ARRAY_SIZE(exynos5440_fixed_rate_ext_clks), ext_clk_match); 120 ARRAY_SIZE(exynos5440_fixed_rate_ext_clks), ext_clk_match);
121 121
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index 82f27f644dae..3a50d4fe0be9 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -54,7 +54,8 @@ static struct syscore_ops samsung_clk_syscore_ops = {
54/* setup the essentials required to support clock lookup using ccf */ 54/* setup the essentials required to support clock lookup using ccf */
55void __init samsung_clk_init(struct device_node *np, void __iomem *base, 55void __init samsung_clk_init(struct device_node *np, void __iomem *base,
56 unsigned long nr_clks, unsigned long *rdump, 56 unsigned long nr_clks, unsigned long *rdump,
57 unsigned long nr_rdump) 57 unsigned long nr_rdump, unsigned long *soc_rdump,
58 unsigned long nr_soc_rdump)
58{ 59{
59 reg_base = base; 60 reg_base = base;
60 61
@@ -62,7 +63,7 @@ void __init samsung_clk_init(struct device_node *np, void __iomem *base,
62 if (rdump && nr_rdump) { 63 if (rdump && nr_rdump) {
63 unsigned int idx; 64 unsigned int idx;
64 reg_dump = kzalloc(sizeof(struct samsung_clk_reg_dump) 65 reg_dump = kzalloc(sizeof(struct samsung_clk_reg_dump)
65 * nr_rdump, GFP_KERNEL); 66 * (nr_rdump + nr_soc_rdump), GFP_KERNEL);
66 if (!reg_dump) { 67 if (!reg_dump) {
67 pr_err("%s: memory alloc for register dump failed\n", 68 pr_err("%s: memory alloc for register dump failed\n",
68 __func__); 69 __func__);
@@ -71,7 +72,9 @@ void __init samsung_clk_init(struct device_node *np, void __iomem *base,
71 72
72 for (idx = 0; idx < nr_rdump; idx++) 73 for (idx = 0; idx < nr_rdump; idx++)
73 reg_dump[idx].offset = rdump[idx]; 74 reg_dump[idx].offset = rdump[idx];
74 nr_reg_dump = nr_rdump; 75 for (idx = 0; idx < nr_soc_rdump; idx++)
76 reg_dump[nr_rdump + idx].offset = soc_rdump[idx];
77 nr_reg_dump = nr_rdump + nr_soc_rdump;
75 register_syscore_ops(&samsung_clk_syscore_ops); 78 register_syscore_ops(&samsung_clk_syscore_ops);
76 } 79 }
77#endif 80#endif
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index 6bacd6fa0200..10b2111f0c0f 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -262,7 +262,8 @@ struct samsung_clk_reg_dump {
262 262
263extern void __init samsung_clk_init(struct device_node *np, void __iomem *base, 263extern void __init samsung_clk_init(struct device_node *np, void __iomem *base,
264 unsigned long nr_clks, unsigned long *rdump, 264 unsigned long nr_clks, unsigned long *rdump,
265 unsigned long nr_rdump); 265 unsigned long nr_rdump, unsigned long *soc_rdump,
266 unsigned long nr_soc_rdump);
266extern void __init samsung_clk_of_register_fixed_ext( 267extern void __init samsung_clk_of_register_fixed_ext(
267 struct samsung_fixed_rate_clock *fixed_rate_clk, 268 struct samsung_fixed_rate_clock *fixed_rate_clk,
268 unsigned int nr_fixed_rate_clk, 269 unsigned int nr_fixed_rate_clk,