diff options
| author | Tero Kristo <[email protected]> | 2021-06-11 11:45:02 +0300 |
|---|---|---|
| committer | Lokesh Vutla <[email protected]> | 2021-06-11 16:34:52 +0530 |
| commit | 7d0f3fbb93cfebd7b5dc5635166e48ab998c4f82 (patch) | |
| tree | bdb88eb5255e85ff5e35815ce0ff85ea1bad0c87 /lib/Kconfig | |
| parent | 08ea87a6de1b9357b6edcfafb90be5bcecfd31c0 (diff) | |
lib: rational: copy the rational fraction lib routines from Linux
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 <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Tero Kristo <[email protected]>
Diffstat (limited to 'lib/Kconfig')
| -rw-r--r-- | lib/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 15019d2c658..ad0cd52edd8 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -674,6 +674,13 @@ config GENERATE_SMBIOS_TABLE See also SMBIOS_SYSINFO which allows SMBIOS values to be provided in the devicetree. +config LIB_RATIONAL + bool "enable continued fraction calculation routines" + +config SPL_LIB_RATIONAL + bool "enable continued fraction calculation routines for SPL" + depends on SPL + endmenu config ASN1_COMPILER |
