mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
ti814x: Fix illegal use of FP ops in clock_ti814x.c
The function pll_sigma_delta_val uses "float" data which is not correct. The exact "why" of this mangling is lost to history, but this changes us to equivalent non-FP math to get the same results. Reported-by: Wolfgang Denk <wd@denx.de> Acked-by: Matt Porter <mporter@linaro.org>
This commit is contained in:
parent
4f80d5ba8e
commit
11f2968706
1 changed files with 1 additions and 4 deletions
|
@ -211,11 +211,8 @@ static u32 pll_dco_freq_sel(u32 clkout_dco)
|
|||
static u32 pll_sigma_delta_val(u32 clkout_dco)
|
||||
{
|
||||
u32 sig_val = 0;
|
||||
float frac_div;
|
||||
|
||||
frac_div = (float) clkout_dco / 250;
|
||||
frac_div = frac_div + 0.90;
|
||||
sig_val = (int)frac_div;
|
||||
sig_val = (clkout_dco + 225) / 250;
|
||||
sig_val = sig_val << 24;
|
||||
|
||||
return sig_val;
|
||||
|
|
Loading…
Add table
Reference in a new issue