arm: allwinner: aw_clk_nm: Don't reparent the clock if we didn't ask

When looking for the best frequency don't change the clock parent if the
clock wasn't configured to do that.
This commit is contained in:
Emmanuel Vadot 2019-05-12 15:27:01 +00:00
parent 8ba6c1391b
commit da153f8e60
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347512

View File

@ -236,7 +236,7 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout,
return (ERANGE);
}
if (p_idx != best_parent)
if ((sc->flags & AW_CLK_REPARENT) != 0 && p_idx != best_parent)
clknode_set_parent_by_idx(clk, best_parent);
DEVICE_LOCK(clk);