]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/arm926ejs/davinci/timer.c
mtd: nand: davinci: add header file for driver definitions
[u-boot] / arch / arm / cpu / arm926ejs / davinci / timer.c
index b620bf7eb1b86a376bb2047bfea7bd8aefea17bb..c7d0652e8301e87243bb10800719db663842bd19 100644 (file)
  *
  * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
  *
- * 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>
@@ -61,7 +45,7 @@ int timer_init(void)
        writel(TIMER_LOAD_VAL, &timer->prd34);
        writel(2 << 22, &timer->tcr);
        gd->arch.timer_rate_hz = CONFIG_SYS_HZ_CLOCK / TIM_CLK_DIV;
-       gd->timer_reset_value = 0;
+       gd->arch.timer_reset_value = 0;
 
        return(0);
 }
@@ -85,7 +69,7 @@ ulong get_timer(ulong base)
 {
        unsigned long long timer_diff;
 
-       timer_diff = get_ticks() - gd->timer_reset_value;
+       timer_diff = get_ticks() - gd->arch.timer_reset_value;
 
        return lldiv(timer_diff,
                     (gd->arch.timer_rate_hz / CONFIG_SYS_HZ)) - base;