|
@@ -374,19 +374,24 @@ static void samsung_clk_sleep_init(void __iomem *reg_base,
|
|
* Common function which registers plls, muxes, dividers and gates
|
|
* Common function which registers plls, muxes, dividers and gates
|
|
* for each CMU. It also add CMU register list to register cache.
|
|
* 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)
|
|
struct samsung_cmu_info *cmu)
|
|
{
|
|
{
|
|
void __iomem *reg_base;
|
|
void __iomem *reg_base;
|
|
struct samsung_clk_provider *ctx;
|
|
struct samsung_clk_provider *ctx;
|
|
|
|
|
|
reg_base = of_iomap(np, 0);
|
|
reg_base = of_iomap(np, 0);
|
|
- if (!reg_base)
|
|
|
|
|
|
+ if (!reg_base) {
|
|
panic("%s: failed to map registers\n", __func__);
|
|
panic("%s: failed to map registers\n", __func__);
|
|
|
|
+ return NULL;
|
|
|
|
+ }
|
|
|
|
|
|
ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
|
|
ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
|
|
- if (!ctx)
|
|
|
|
|
|
+ if (!ctx) {
|
|
panic("%s: unable to alllocate ctx\n", __func__);
|
|
panic("%s: unable to alllocate ctx\n", __func__);
|
|
|
|
+ return ctx;
|
|
|
|
+ }
|
|
|
|
|
|
if (cmu->pll_clks)
|
|
if (cmu->pll_clks)
|
|
samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_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);
|
|
cmu->nr_clk_regs);
|
|
|
|
|
|
samsung_clk_of_add_provider(np, ctx);
|
|
samsung_clk_of_add_provider(np, ctx);
|
|
|
|
+
|
|
|
|
+ return ctx;
|
|
}
|
|
}
|