tegra124: Implement the monotonic timer by reading the 1us timer register.
It turns out there's a register in tegra which automatically counts at 1us
increments. It's primarily intended for hardware to use (I think to drive
other timers) but we can read it ourselves since a 1us timer is exactly what
we need to support the monotonic timer API.
TEST=Built and booted into the bootblock on nyan with test code in the
bootblock. Used that code to print two serial messages, 1 minute apart. The
messages happened 1 minute and 2 seconds apart. That's pretty close, although
it might be worthwhile to figure out where those extra two seconds are coming
from (measurement error?).
Signed-off-by: Gabe Black <email@example.com>
Reviewed-by: Ronald Minnich <firstname.lastname@example.org>
Reviewed-by: David Hendricks <email@example.com>
Commit-Queue: Gabe Black <firstname.lastname@example.org>
Tested-by: Gabe Black <email@example.com>
1 file changed