genode-ehmry/repos/base-hw/src/core/spec/cortex_a9
Martin Stein 399e1586be timer: generic timer_ticks_to_us implementation
There are hardware timers whose frequency can't be expressed as
ticks-per-microsecond integer-value because only a ticks-per-millisecond
integer-value is precise enough. We don't want to use expensive
floating-point values here but nonetheless want to translate from ticks
to time with microseconds precision. Thus, we split the input in two and
translate both parts separately. This way, we can raise precision by
shifting the values to their optimal bit position. Afterwards, the results
are shifted back and merged together again.

As this algorithm is not so trivial anymore and used by at least three
timer drivers (base-hw/x86_64, base-hw/cortex_a9, timer/pit), move it to a
generic header to avoid redundancy.

Ref #2400
2017-08-28 16:49:49 +02:00
..
kernel hw core: merge Kernel::Clock and Kernel::Timer 2017-05-31 13:16:10 +02:00
board.cc base: remove include/spec/* other than ISA 2017-05-31 13:16:01 +02:00
cpu.h base: remove include/spec/* other than ISA 2017-05-31 13:16:01 +02:00
fpu.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
macros.s hw: remove core internal header directories 2017-05-31 13:15:52 +02:00
timer_driver.h hw core: merge Kernel::Clock and Kernel::Timer 2017-05-31 13:16:10 +02:00
timer.cc timer: generic timer_ticks_to_us implementation 2017-08-28 16:49:49 +02:00
translation_table.h hw: remove core internal header directories 2017-05-31 13:15:52 +02:00