forked from Minki/linux
Second round of fixes for meson clocks targeted for v5.1:
- clk-pll: fix rate rounding fixing meson8b boot failure - vid-pll-div: fix recal_rate warning and return when invalid setting -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJcndsrAAoJEHfc29rIyEnRWosQAJVMKETo70Iq1ya6CTaBbVtl lF/NecxIBQJt7Pv1nfeA1G2WSHALNPD/91JFcrSMgWZEfY4cmdxCcqChCw4hgMIk 2EYeNBrtI6IICTtdn3bEePTHuw9ORNzQm2JU02eg1aGz4fuxAIesoUXroulUrKGy VYOYrJHftKFctMXvf314IdfoCrQmXmBsRSY3aMKrGZmjGJpZ6PJCiTzxsquPyeOz VZzxtaCyPlEkNTm92y65ex7zhN/fQIQUULT6ecr1iy+hp0ByfCwcHzGi0lu36ie1 QC1ZDfrqJH/+/F+ylejjeHsgq1rLrLhUCPbHeD+PTz7IjxEm6s2ksxDRu2qjqR46 qdm+MkLcOPS/b+vLlDvE3/IbxHmyAp69N5QdLQlZHeFVQnjupOLpJYa8F/DswaT9 ZAMbd8yo5EXZuBD6hlppfSOsj3KQWS8c2GszHDTzV83TM7ST0UF8CUvfSc+uXue9 xU5ojlqNp0XR+roke/sSxrgA2I/xNeqVhwRltNXIQ+v40jHq2ss2Vuw+7Gu5+mp3 BCOoHwX57wwLmBiV6BK3Wbl1uI3B2IE8nYH+fMbNnAeg+TRvjUGZQAiza6UkkSqx NSpn/iBBpS2u+RrxBWJglIoAv7iwI+JQbfk3HIWwdwlif5jMDGphdV5OieE6MCd1 G2Uy5XdNgF1cvs565B9i =muUm -----END PGP SIGNATURE----- Merge tag 'meson-clk-fixes-for-5.1-v2' of https://github.com/BayLibre/clk-meson into clk-fixes Pull more fixes for meson clocks from Neil Armstrong: - clk-pll: fix rate rounding fixing meson8b boot failure - vid-pll-div: fix recal_rate warning and return when invalid setting * tag 'meson-clk-fixes-for-5.1-v2' of https://github.com/BayLibre/clk-meson: clk: meson: vid-pll-div: remove warning and return 0 on invalid config clk: meson: pll: fix rounding and setting a rate that matches precisely
This commit is contained in:
commit
9f842abde8
@ -120,7 +120,7 @@ static bool meson_clk_pll_is_better(unsigned long rate,
|
||||
return true;
|
||||
} else {
|
||||
/* Round down */
|
||||
if (now < rate && best < now)
|
||||
if (now <= rate && best < now)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -82,8 +82,8 @@ static unsigned long meson_vid_pll_div_recalc_rate(struct clk_hw *hw,
|
||||
div = _get_table_val(meson_parm_read(clk->map, &pll_div->val),
|
||||
meson_parm_read(clk->map, &pll_div->sel));
|
||||
if (!div || !div->divider) {
|
||||
pr_info("%s: Invalid config value for vid_pll_div\n", __func__);
|
||||
return parent_rate;
|
||||
pr_debug("%s: Invalid config value for vid_pll_div\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return DIV_ROUND_UP_ULL(parent_rate * div->multiplier, div->divider);
|
||||
|
Loading…
Reference in New Issue
Block a user