diff options
Diffstat (limited to 'lib/time.c')
-rw-r--r-- | lib/time.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/time.c b/lib/time.c index 88bc50405f..cc6944ec34 100644 --- a/lib/time.c +++ b/lib/time.c @@ -9,6 +9,7 @@ #include <dm.h> #include <errno.h> #include <init.h> +#include <spl.h> #include <time.h> #include <timer.h> #include <watchdog.h> @@ -96,8 +97,13 @@ uint64_t notrace get_ticks(void) } ret = timer_get_count(gd->timer, &count); - if (ret) - panic("Could not read count from timer (err %d)\n", ret); + if (ret) { + if (spl_phase() > PHASE_TPL) + panic("Could not read count from timer (err %d)\n", + ret); + else + panic("no timer (err %d)\n", ret); + } return count; } |