summaryrefslogtreecommitdiff
path: root/drivers/clk/samsung/clk.c
diff options
context:
space:
mode:
authorMichael Turquette <mturquette@linaro.org>2015-02-03 01:51:16 +0300
committerMichael Turquette <mturquette@linaro.org>2015-02-03 01:51:16 +0300
commitb530e7d2108a871279dcf707d9d15a3358767d2b (patch)
tree6eb7308e6cebd453d6247f88fa6f225e8a163784 /drivers/clk/samsung/clk.c
parenta251361ac4cc5371a424d70fa0fd591dc9e83a5f (diff)
parente64fb42da4c6c713cfc7cad607e97e0773fa41ff (diff)
downloadlinux-b530e7d2108a871279dcf707d9d15a3358767d2b.tar.xz
Merge tag 'v3.20-exynos-clk' of git://linuxtv.org/snawrocki/samsung into clk-next
Exynos 3250, 4415 drivers cleanup by using common code and addition of clock definitions for DVFS on Exynos4.
Diffstat (limited to 'drivers/clk/samsung/clk.c')
-rw-r--r--drivers/clk/samsung/clk.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index 4bda54095a16..9e1f88c04fd4 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -374,19 +374,24 @@ static void samsung_clk_sleep_init(void __iomem *reg_base,
* Common function which registers plls, muxes, dividers and gates
* for each CMU. It also add CMU register list to register cache.
*/
-void __init samsung_cmu_register_one(struct device_node *np,
+struct samsung_clk_provider * __init samsung_cmu_register_one(
+ struct device_node *np,
struct samsung_cmu_info *cmu)
{
void __iomem *reg_base;
struct samsung_clk_provider *ctx;
reg_base = of_iomap(np, 0);
- if (!reg_base)
+ if (!reg_base) {
panic("%s: failed to map registers\n", __func__);
+ return NULL;
+ }
ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
- if (!ctx)
+ if (!ctx) {
panic("%s: unable to alllocate ctx\n", __func__);
+ return ctx;
+ }
if (cmu->pll_clks)
samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
@@ -410,4 +415,6 @@ void __init samsung_cmu_register_one(struct device_node *np,
cmu->nr_clk_regs);
samsung_clk_of_add_provider(np, ctx);
+
+ return ctx;
}