Loading drivers/clk/qcom/clock-generic.c +0 −12 Original line number Diff line number Diff line Loading @@ -21,18 +21,6 @@ /* ==================== Mux clock ==================== */ int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p) { int i; for (i = 0; i < num_parents; i++) { if (parents[i].src == p) return parents[i].sel; } return -EINVAL; } static int mux_parent_to_src_sel(struct mux_clk *mux, struct clk *p) { return parent_to_src_sel(mux->parents, mux->num_parents, p); Loading drivers/clk/qcom/clock.c +26 −1 Original line number Diff line number Diff line Loading @@ -586,6 +586,25 @@ int clk_set_max_rate(struct clk *clk, unsigned long rate) } EXPORT_SYMBOL(clk_set_max_rate); int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p) { int i; for (i = 0; i < num_parents; i++) { if (parents[i].src == p) return parents[i].sel; } return -EINVAL; } EXPORT_SYMBOL(parent_to_src_sel); int clk_get_parent_sel(struct clk *c, struct clk *parent) { return parent_to_src_sel(c->parents, c->num_parents, parent); } EXPORT_SYMBOL(clk_get_parent_sel); int clk_set_parent(struct clk *clk, struct clk *parent) { int rc = 0; Loading Loading @@ -673,7 +692,7 @@ static int __handoff_clk(struct clk *clk) { enum handoff state = HANDOFF_DISABLED_CLK; struct handoff_clk *h = NULL; int rc; int rc, i; if (clk == NULL || clk->flags & CLKFLAG_INIT_DONE || clk->flags & CLKFLAG_SKIP_HANDOFF) Loading Loading @@ -705,6 +724,12 @@ static int __handoff_clk(struct clk *clk) if (rc) goto err; for (i = 0; i < clk->num_parents; i++) { rc = __handoff_clk(clk->parents[i].src); if (rc) goto err; } if (clk->ops->handoff) state = clk->ops->handoff(clk); Loading include/linux/clk/msm-clk-provider.h +2 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,8 @@ struct clk { int num_fmax; unsigned long rate; struct clk *parent; struct clk_src *parents; unsigned int num_parents; struct list_head children; struct list_head siblings; Loading include/linux/clk/msm-clk.h +11 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ enum clk_reset_action { CLK_RESET_ASSERT = 1 }; struct clk_src { struct clk *src; int sel; }; /* Rate is maximum clock rate in Hz */ int clk_set_max_rate(struct clk *clk, unsigned long rate); Loading @@ -45,4 +50,10 @@ int clk_reset(struct clk *clk, enum clk_reset_action action); /* Set clock-specific configuration parameters */ int clk_set_flags(struct clk *clk, unsigned long flags); /* returns the mux selection index associated with a particular parent */ int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p); /* returns the mux selection index associated with a particular parent */ int clk_get_parent_sel(struct clk *c, struct clk *parent); #endif include/linux/clk/msm-clock-generic.h +0 −7 Original line number Diff line number Diff line Loading @@ -27,11 +27,6 @@ struct fixed_clk { /* ==================== Mux clock ==================== */ struct clk_src { struct clk *src; int sel; }; struct mux_clk; struct clk_mux_ops { Loading Loading @@ -82,8 +77,6 @@ static inline struct mux_clk *to_mux_clk(struct clk *c) return container_of(c, struct mux_clk, c); } int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p); extern struct clk_ops clk_ops_gen_mux; /* ==================== Divider clock ==================== */ Loading Loading
drivers/clk/qcom/clock-generic.c +0 −12 Original line number Diff line number Diff line Loading @@ -21,18 +21,6 @@ /* ==================== Mux clock ==================== */ int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p) { int i; for (i = 0; i < num_parents; i++) { if (parents[i].src == p) return parents[i].sel; } return -EINVAL; } static int mux_parent_to_src_sel(struct mux_clk *mux, struct clk *p) { return parent_to_src_sel(mux->parents, mux->num_parents, p); Loading
drivers/clk/qcom/clock.c +26 −1 Original line number Diff line number Diff line Loading @@ -586,6 +586,25 @@ int clk_set_max_rate(struct clk *clk, unsigned long rate) } EXPORT_SYMBOL(clk_set_max_rate); int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p) { int i; for (i = 0; i < num_parents; i++) { if (parents[i].src == p) return parents[i].sel; } return -EINVAL; } EXPORT_SYMBOL(parent_to_src_sel); int clk_get_parent_sel(struct clk *c, struct clk *parent) { return parent_to_src_sel(c->parents, c->num_parents, parent); } EXPORT_SYMBOL(clk_get_parent_sel); int clk_set_parent(struct clk *clk, struct clk *parent) { int rc = 0; Loading Loading @@ -673,7 +692,7 @@ static int __handoff_clk(struct clk *clk) { enum handoff state = HANDOFF_DISABLED_CLK; struct handoff_clk *h = NULL; int rc; int rc, i; if (clk == NULL || clk->flags & CLKFLAG_INIT_DONE || clk->flags & CLKFLAG_SKIP_HANDOFF) Loading Loading @@ -705,6 +724,12 @@ static int __handoff_clk(struct clk *clk) if (rc) goto err; for (i = 0; i < clk->num_parents; i++) { rc = __handoff_clk(clk->parents[i].src); if (rc) goto err; } if (clk->ops->handoff) state = clk->ops->handoff(clk); Loading
include/linux/clk/msm-clk-provider.h +2 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,8 @@ struct clk { int num_fmax; unsigned long rate; struct clk *parent; struct clk_src *parents; unsigned int num_parents; struct list_head children; struct list_head siblings; Loading
include/linux/clk/msm-clk.h +11 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ enum clk_reset_action { CLK_RESET_ASSERT = 1 }; struct clk_src { struct clk *src; int sel; }; /* Rate is maximum clock rate in Hz */ int clk_set_max_rate(struct clk *clk, unsigned long rate); Loading @@ -45,4 +50,10 @@ int clk_reset(struct clk *clk, enum clk_reset_action action); /* Set clock-specific configuration parameters */ int clk_set_flags(struct clk *clk, unsigned long flags); /* returns the mux selection index associated with a particular parent */ int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p); /* returns the mux selection index associated with a particular parent */ int clk_get_parent_sel(struct clk *c, struct clk *parent); #endif
include/linux/clk/msm-clock-generic.h +0 −7 Original line number Diff line number Diff line Loading @@ -27,11 +27,6 @@ struct fixed_clk { /* ==================== Mux clock ==================== */ struct clk_src { struct clk *src; int sel; }; struct mux_clk; struct clk_mux_ops { Loading Loading @@ -82,8 +77,6 @@ static inline struct mux_clk *to_mux_clk(struct clk *c) return container_of(c, struct mux_clk, c); } int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p); extern struct clk_ops clk_ops_gen_mux; /* ==================== Divider clock ==================== */ Loading