Commit b192d040 authored by Guoniu.zhou's avatar Guoniu.zhou Committed by Abel Vesa
Browse files

clk: imx: scu: add parallel port clock ops



Because digital pll for parallel interface is on by default, and
not provide enable/disable function by scu, so add the related ops
for this kind of clocks.

Signed-off-by: default avatarGuoniu.zhou <guoniu.zhou@nxp.com>
Signed-off-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: default avatarAbel Vesa <abel.vesa@nxp.com>
Signed-off-by: default avatarAbel Vesa <abel.vesa@nxp.com>
parent babfaa95
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -425,6 +425,12 @@ static const struct clk_ops clk_scu_cpu_ops = {
	.unprepare = clk_scu_unprepare,
	.unprepare = clk_scu_unprepare,
};
};


static const struct clk_ops clk_scu_pi_ops = {
	.recalc_rate = clk_scu_recalc_rate,
	.round_rate  = clk_scu_round_rate,
	.set_rate    = clk_scu_set_rate,
};

struct clk_hw *__imx_clk_scu(struct device *dev, const char *name,
struct clk_hw *__imx_clk_scu(struct device *dev, const char *name,
			     const char * const *parents, int num_parents,
			     const char * const *parents, int num_parents,
			     u32 rsrc_id, u8 clk_type)
			     u32 rsrc_id, u8 clk_type)
@@ -445,6 +451,8 @@ struct clk_hw *__imx_clk_scu(struct device *dev, const char *name,
	init.ops = &clk_scu_ops;
	init.ops = &clk_scu_ops;
	if (rsrc_id == IMX_SC_R_A35)
	if (rsrc_id == IMX_SC_R_A35)
		init.ops = &clk_scu_cpu_ops;
		init.ops = &clk_scu_cpu_ops;
	else if (rsrc_id == IMX_SC_R_PI_0_PLL)
		init.ops = &clk_scu_pi_ops;
	else
	else
		init.ops = &clk_scu_ops;
		init.ops = &clk_scu_ops;
	init.parent_names = parents;
	init.parent_names = parents;