summaryrefslogtreecommitdiff
path: root/arch/arc/lib/timer.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-03-24 08:19:30 -0400
committerTom Rini <trini@konsulko.com>2017-03-24 08:19:30 -0400
commit5cf618ee60a752d058a767372ca1ecb8d9c09b16 (patch)
tree417a20db2bc9bb97bcc54b5d96dc7b1ccd192d6a /arch/arc/lib/timer.c
parentc1daa4077365747d4f85ed8c93ba4d318d96a4af (diff)
parent3daa7c7b831ddeed0e490a899710a58691ee20c3 (diff)
Merge git://git.denx.de/u-boot-arc
This replaces legacy arch/arc/lib/timer.c implementation and allows us to describe ARC Timers in Device Tree. Among other things that way we may properly inherit Timer's clock from CPU's clock s they really run synchronously.
Diffstat (limited to 'arch/arc/lib/timer.c')
-rw-r--r--arch/arc/lib/timer.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/arc/lib/timer.c b/arch/arc/lib/timer.c
deleted file mode 100644
index a0acbbc01a4..00000000000
--- a/arch/arc/lib/timer.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <asm/arcregs.h>
-
-#define NH_MODE (1 << 1) /* Disable timer if CPU is halted */
-
-int timer_init(void)
-{
- write_aux_reg(ARC_AUX_TIMER0_CTRL, NH_MODE);
- /* Set max value for counter/timer */
- write_aux_reg(ARC_AUX_TIMER0_LIMIT, 0xffffffff);
- /* Set initial count value and restart counter/timer */
- write_aux_reg(ARC_AUX_TIMER0_CNT, 0);
- return 0;
-}
-
-unsigned long timer_read_counter(void)
-{
- return read_aux_reg(ARC_AUX_TIMER0_CNT);
-}