[PATCHv2 01/25] lib: rational: copy the rational fraction lib routines from Linux

Tom Rini trini at konsulko.com
Sat Nov 21 14:04:08 CET 2020


On Fri, Nov 20, 2020 at 01:23:02PM +0200, Tero Kristo wrote:

> Copy the best rational approximation calculation routines from Linux.
> Typical usecase for these routines is to calculate the M/N divider
> values for PLLs to reach a specific clock rate.
> 
> This is based on linux kernel commit:
> "lib/math/rational.c: fix possible incorrect result from rational
> fractions helper"
> (sha1: 323dd2c3ed0641f49e89b4e420f9eef5d3d5a881)
> 
> Signed-off-by: Tero Kristo <t-kristo at ti.com>

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201121/af48f177/attachment.sig>


More information about the U-Boot mailing list