diff options
Diffstat (limited to 'arch/arm/mach-imx/syscounter.c')
-rw-r--r-- | arch/arm/mach-imx/syscounter.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index 676bb3caa9..c888a93938 100644 --- a/arch/arm/mach-imx/syscounter.c +++ b/arch/arm/mach-imx/syscounter.c | |||
@@ -55,6 +55,7 @@ static inline unsigned long long us_to_tick(unsigned long long usec) | |||
55 | return usec; | 55 | return usec; |
56 | } | 56 | } |
57 | 57 | ||
58 | #ifndef CONFIG_SKIP_LOWLEVEL_INIT | ||
58 | int timer_init(void) | 59 | int timer_init(void) |
59 | { | 60 | { |
60 | struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR; | 61 | struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR; |
@@ -76,6 +77,7 @@ int timer_init(void) | |||
76 | 77 | ||
77 | return 0; | 78 | return 0; |
78 | } | 79 | } |
80 | #endif | ||
79 | 81 | ||
80 | unsigned long long get_ticks(void) | 82 | unsigned long long get_ticks(void) |
81 | { | 83 | { |
@@ -89,14 +91,9 @@ unsigned long long get_ticks(void) | |||
89 | return now; | 91 | return now; |
90 | } | 92 | } |
91 | 93 | ||
92 | ulong get_timer_masked(void) | ||
93 | { | ||
94 | return tick_to_time(get_ticks()); | ||
95 | } | ||
96 | |||
97 | ulong get_timer(ulong base) | 94 | ulong get_timer(ulong base) |
98 | { | 95 | { |
99 | return get_timer_masked() - base; | 96 | return tick_to_time(get_ticks()) - base; |
100 | } | 97 | } |
101 | 98 | ||
102 | void __udelay(unsigned long usec) | 99 | void __udelay(unsigned long usec) |