forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/clk/samsung/clk-exynos5-subcmu.c
....@@ -4,6 +4,7 @@
44 // Author: Marek Szyprowski <m.szyprowski@samsung.com>
55 // Common Clock Framework support for Exynos5 power-domain dependent clocks
66
7
+#include <linux/io.h>
78 #include <linux/of_platform.h>
89 #include <linux/platform_device.h>
910 #include <linux/pm_domain.h>
....@@ -13,7 +14,7 @@
1314 #include "clk-exynos5-subcmu.h"
1415
1516 static struct samsung_clk_provider *ctx;
16
-static const struct exynos5_subcmu_info *cmu;
17
+static const struct exynos5_subcmu_info **cmu;
1718 static int nr_cmus;
1819
1920 static void exynos5_subcmu_clk_save(void __iomem *base,
....@@ -55,17 +56,17 @@
5556 * when OF-core populates all device-tree nodes.
5657 */
5758 void exynos5_subcmus_init(struct samsung_clk_provider *_ctx, int _nr_cmus,
58
- const struct exynos5_subcmu_info *_cmu)
59
+ const struct exynos5_subcmu_info **_cmu)
5960 {
6061 ctx = _ctx;
6162 cmu = _cmu;
6263 nr_cmus = _nr_cmus;
6364
6465 for (; _nr_cmus--; _cmu++) {
65
- exynos5_subcmu_defer_gate(ctx, _cmu->gate_clks,
66
- _cmu->nr_gate_clks);
67
- exynos5_subcmu_clk_save(ctx->reg_base, _cmu->suspend_regs,
68
- _cmu->nr_suspend_regs);
66
+ exynos5_subcmu_defer_gate(ctx, (*_cmu)->gate_clks,
67
+ (*_cmu)->nr_gate_clks);
68
+ exynos5_subcmu_clk_save(ctx->reg_base, (*_cmu)->suspend_regs,
69
+ (*_cmu)->nr_suspend_regs);
6970 }
7071 }
7172
....@@ -162,9 +163,9 @@
162163 if (of_property_read_string(np, "label", &name) < 0)
163164 continue;
164165 for (i = 0; i < nr_cmus; i++)
165
- if (strcmp(cmu[i].pd_name, name) == 0)
166
+ if (strcmp(cmu[i]->pd_name, name) == 0)
166167 exynos5_clk_register_subcmu(&pdev->dev,
167
- &cmu[i], np);
168
+ cmu[i], np);
168169 }
169170 return 0;
170171 }