struct clk *pll_clk, *mux_clk;
char pll_name[20];
- if (num_parents != 2) {
+ if ((pll_type != pll_rk3328 && num_parents != 2) ||
+ (pll_type == pll_rk3328 && num_parents != 1)) {
pr_err("%s: needs two parent clocks\n", __func__);
return ERR_PTR(-EINVAL);
}
init.flags = CLK_SET_RATE_PARENT;
init.ops = pll->pll_mux_ops;
init.parent_names = pll_parents;
- init.num_parents = ARRAY_SIZE(pll_parents);
+ if (pll_type == pll_rk3328)
+ init.num_parents = 2;
+ else
+ init.num_parents = ARRAY_SIZE(pll_parents);
mux_clk = clk_register(NULL, &pll_mux->hw);
if (IS_ERR(mux_clk))
switch (pll_type) {
case pll_rk3036:
+ case pll_rk3328:
if (!pll->rate_table)
init.ops = &rockchip_rk3036_pll_clk_norate_ops;
else
else
init.ops = &rockchip_rk3066_pll_clk_ops;
break;
- case pll_rk3328:
- if (!pll->rate_table)
- init.ops = &rockchip_rk3036_pll_clk_norate_ops;
- else
- init.ops = &rockchip_rk3036_pll_clk_ops;
- break;
case pll_rk3366:
if (!pll->rate_table)
init.ops = &rockchip_rk3366_pll_clk_norate_ops;
ctx->cru_node = np;
ctx->grf = ERR_PTR(-EPROBE_DEFER);
spin_lock_init(&ctx->lock);
+ ctx->grf = syscon_regmap_lookup_by_phandle(ctx->cru_node,
+ "rockchip,grf");
return ctx;