]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - lib/time.c
usb: r8a66597: Fix initialization hub that using R8A66597_MAX_ROOT_HUB
[karo-tx-uboot.git] / lib / time.c
index 09bb05a24d331b0f023a149024278952e0e89054..73c3b6ad7ff4503c3b485dbdab091601575e3a12 100644 (file)
@@ -60,6 +60,11 @@ static unsigned long long notrace tick_to_time(uint64_t tick)
        return tick;
 }
 
+int __weak timer_init(void)
+{
+       return 0;
+}
+
 ulong __weak get_timer(ulong base)
 {
        return tick_to_time(get_ticks()) - base;
@@ -71,8 +76,8 @@ unsigned long __weak notrace timer_get_us(void)
 }
 static unsigned long long usec_to_tick(unsigned long usec)
 {
-       uint64_t tick = usec * get_tbclk();
-       usec *= get_tbclk();
+       uint64_t tick = usec;
+       tick *= get_tbclk();
        do_div(tick, 1000000);
        return tick;
 }