]> git.dujemihanovic.xyz Git - u-boot.git/commit
rockchip: timer: implement timer_get_boot_us
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 11 Sep 2017 20:04:16 +0000 (22:04 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 18 Sep 2017 18:40:34 +0000 (20:40 +0200)
commitcc7ce94e02799c5caa6d9c89350152f00ba3eb90
tree0cd832809f79d2b4789f6493fb31e23ce209824c
parentbe5f04e850e89639ffe7ec4d2dccd327eb354cde
rockchip: timer: implement timer_get_boot_us

To make the Rockchip DM timer driver useful for the timing of
bootstages, we need a few enhancements:
 - This implements timer_get_boot_us.
 - This avoids reinitialising the timer, if it has already been
   set up (e.g. by our TPL and SPL stages). Now, we have a single
   timebase ticking from TPL through the full U-Boot.
 - This adds support for reading the timer even before the
   device-model is ready: we find the timer via /chosen/tick-timer,
   then read its address and clock-frequency, and finally read the
   timeval directly).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
drivers/timer/rockchip_timer.c