]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/pxa/timer.c
sunxi: add sun7i dram setup support
[karo-tx-uboot.git] / arch / arm / cpu / pxa / timer.c
index 212b31eb6853f7d4182ef2b2b745dfe37abf8989..c4717de6a9c4ccdd3d551c1e5acd8016d93f840a 100644 (file)
@@ -3,23 +3,7 @@
  *
  * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
  *
- * 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 <asm/arch/pxa-regs.h>
@@ -44,12 +28,12 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static unsigned long long tick_to_time(unsigned long long tick)
 {
-       return tick * CONFIG_SYS_HZ / TIMER_FREQ_HZ;
+       return lldiv(tick * CONFIG_SYS_HZ, TIMER_FREQ_HZ);
 }
 
 static unsigned long long us_to_tick(unsigned long long us)
 {
-       return (us * TIMER_FREQ_HZ) / 1000000;
+       return lldiv(us * TIMER_FREQ_HZ, 1000000);
 }
 
 int timer_init(void)