]> git.baikalelectronics.ru Git - uboot.git/commit
time: move the CONFIG_SYS_TIMER_RATE handling to the compiler
authorMichael Walle <michael@walle.cc>
Wed, 17 Aug 2022 19:37:48 +0000 (21:37 +0200)
committerStefan Roese <sr@denx.de>
Tue, 23 Aug 2022 10:38:30 +0000 (12:38 +0200)
commit60f16f8f0ad94756f6743c8cea390dc4b9baca04
tree355500f0b9baa66528aa555110a63b67b56ff6b1
parent2e6b865cb1f13fa9dc27ded1a9fd147fdf133434
time: move the CONFIG_SYS_TIMER_RATE handling to the compiler

CONFIG_SYS_TIMER_RATE might be a dynamic value, i.e. a function call
instead of a static value, thus it has to be evaluated at runtime. If it
is a static value, the compiler should be able to optimize the unused
branches out.

This will be needed for kirkwoods dynamic CONFIG_SYS_TCLK setting.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
lib/time.c