arm64: rockchip: armclk: Do not change parent freq if CLK_SET_DRYRUN is set

MFC after:	3 days
This commit is contained in:
Emmanuel Vadot 2018-11-29 19:11:35 +00:00
parent baec4d5985
commit fc06a872ec
1 changed files with 6 additions and 6 deletions

View File

@ -163,18 +163,18 @@ rk_clk_armclk_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout,
if (rate == sc->nrates)
return (0);
err = clknode_set_freq(p_main, best_p, 0, 1);
if (err != 0)
printf("Cannot set %s to %lu\n",
clknode_get_name(p_main),
best_p);
if ((flags & CLK_SET_DRYRUN) != 0) {
*fout = best;
*stop = 1;
return (0);
}
err = clknode_set_freq(p_main, best_p, 0, 1);
if (err != 0)
printf("Cannot set %s to %lu\n",
clknode_get_name(p_main),
best_p);
DEVICE_LOCK(clk);
READ4(clk, sc->muxdiv_offset, &val);
val &= ~sc->div_mask;