]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/arm925t/timer.c
samsung: trats2: add support for new board Trats2
[karo-tx-uboot.git] / arch / arm / cpu / arm925t / timer.c
index 7dfe2b56463b6c03f7c5551b2fc569631aa0dd12..e56b576b18be00b7f754d243817b26dcbe317a0d 100644 (file)
  * (C) Copyright 2002
  * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+ 
  */
 
 #include <common.h>
@@ -56,7 +40,9 @@ int timer_init (void)
                CONFIG_SYS_TIMERBASE + CNTL_TIMER);
 
        /* init the timestamp and lastdec value */
-       reset_timer_masked();
+       lastdec = __raw_readl(CONFIG_SYS_TIMERBASE + READ_TIM) /
+                       (TIMER_CLOCK / CONFIG_SYS_HZ);
+       timestamp = 0;         /* start "advancing" time stamp from 0 */
 
        return 0;
 }
@@ -64,22 +50,11 @@ int timer_init (void)
 /*
  * timer without interrupts
  */
-
-void reset_timer (void)
-{
-       reset_timer_masked ();
-}
-
 ulong get_timer (ulong base)
 {
        return get_timer_masked () - base;
 }
 
-void set_timer (ulong t)
-{
-       timestamp = t;
-}
-
 /* delay x useconds AND preserve advance timestamp value */
 void __udelay (unsigned long usec)
 {
@@ -96,14 +71,6 @@ void __udelay (unsigned long usec)
        }
 }
 
-void reset_timer_masked (void)
-{
-       /* reset time */
-       lastdec = __raw_readl(CONFIG_SYS_TIMERBASE + READ_TIM) /
-                       (TIMER_CLOCK / CONFIG_SYS_HZ);
-       timestamp = 0;         /* start "advancing" time stamp from 0 */
-}
-
 ulong get_timer_masked (void)
 {
        uint32_t now = __raw_readl(CONFIG_SYS_TIMERBASE + READ_TIM) /