summaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2021-06-11 11:45:02 +0300
committerLokesh Vutla <lokeshvutla@ti.com>2021-06-11 14:04:52 +0300
commit7d0f3fbb93cfebd7b5dc5635166e48ab998c4f82 (patch)
treebdb88eb5255e85ff5e35815ce0ff85ea1bad0c87 /lib/Makefile
parent08ea87a6de1b9357b6edcfafb90be5bcecfd31c0 (diff)
downloadu-boot-7d0f3fbb93cfebd7b5dc5635166e48ab998c4f82.tar.xz
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 <t-kristo@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index b4795a62a0..881034f4ae 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -73,6 +73,8 @@ obj-$(CONFIG_$(SPL_)LZO) += lzo/
obj-$(CONFIG_$(SPL_)LZMA) += lzma/
obj-$(CONFIG_$(SPL_)LZ4) += lz4_wrapper.o
+obj-$(CONFIG_$(SPL_)LIB_RATIONAL) += rational.o
+
obj-$(CONFIG_LIBAVB) += libavb/
obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/