| .. | .. |
|---|
| 4 | 4 | // Author: Marek Szyprowski <m.szyprowski@samsung.com> |
|---|
| 5 | 5 | // Common Clock Framework support for Exynos5 power-domain dependent clocks |
|---|
| 6 | 6 | |
|---|
| 7 | +#include <linux/io.h> |
|---|
| 7 | 8 | #include <linux/of_platform.h> |
|---|
| 8 | 9 | #include <linux/platform_device.h> |
|---|
| 9 | 10 | #include <linux/pm_domain.h> |
|---|
| .. | .. |
|---|
| 13 | 14 | #include "clk-exynos5-subcmu.h" |
|---|
| 14 | 15 | |
|---|
| 15 | 16 | static struct samsung_clk_provider *ctx; |
|---|
| 16 | | -static const struct exynos5_subcmu_info *cmu; |
|---|
| 17 | +static const struct exynos5_subcmu_info **cmu; |
|---|
| 17 | 18 | static int nr_cmus; |
|---|
| 18 | 19 | |
|---|
| 19 | 20 | static void exynos5_subcmu_clk_save(void __iomem *base, |
|---|
| .. | .. |
|---|
| 55 | 56 | * when OF-core populates all device-tree nodes. |
|---|
| 56 | 57 | */ |
|---|
| 57 | 58 | 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) |
|---|
| 59 | 60 | { |
|---|
| 60 | 61 | ctx = _ctx; |
|---|
| 61 | 62 | cmu = _cmu; |
|---|
| 62 | 63 | nr_cmus = _nr_cmus; |
|---|
| 63 | 64 | |
|---|
| 64 | 65 | 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); |
|---|
| 69 | 70 | } |
|---|
| 70 | 71 | } |
|---|
| 71 | 72 | |
|---|
| .. | .. |
|---|
| 162 | 163 | if (of_property_read_string(np, "label", &name) < 0) |
|---|
| 163 | 164 | continue; |
|---|
| 164 | 165 | 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) |
|---|
| 166 | 167 | exynos5_clk_register_subcmu(&pdev->dev, |
|---|
| 167 | | - &cmu[i], np); |
|---|
| 168 | + cmu[i], np); |
|---|
| 168 | 169 | } |
|---|
| 169 | 170 | return 0; |
|---|
| 170 | 171 | } |
|---|