X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=arch%2Farm%2Fmach-imx%2Fsyscounter.c;h=c888a939385be128627c55510a82886af0bfdf54;hb=6ed4d26c21e46ed00ea65679b40aaf967d043dfd;hp=1d4ebfe3439ff1fb078ca820674fcdd957b058f8;hpb=2e5c42c630c4c550abf9d8da8cc11d8a7928ab0a;p=oweals%2Fu-boot.git diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index 1d4ebfe343..c888a93938 100644 --- a/arch/arm/mach-imx/syscounter.c +++ b/arch/arm/mach-imx/syscounter.c @@ -1,8 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2015 Freescale Semiconductor, Inc. * - * SPDX-License-Identifier: GPL-2.0+ - * * The file use ls102xa/timer.c as a reference. */ @@ -56,6 +55,7 @@ static inline unsigned long long us_to_tick(unsigned long long usec) return usec; } +#ifndef CONFIG_SKIP_LOWLEVEL_INIT int timer_init(void) { struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR; @@ -77,6 +77,7 @@ int timer_init(void) return 0; } +#endif unsigned long long get_ticks(void) { @@ -90,14 +91,9 @@ unsigned long long get_ticks(void) return now; } -ulong get_timer_masked(void) -{ - return tick_to_time(get_ticks()); -} - ulong get_timer(ulong base) { - return get_timer_masked() - base; + return tick_to_time(get_ticks()) - base; } void __udelay(unsigned long usec)