From 7244ed40615a16cfa238b4ae2666d7825d5bc734 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 2 Nov 2015 15:00:10 -0800 Subject: arm: vf610: fix delay when using global timer The global timer used to divide the waiting cycles by two for no reason, which lead to too short delays (e.g. when waiting for PHY). This fixes an issue seen when bootdelay is 0 and the boot command requires network: FEC Waiting for PHY auto negotiation to complete......... TIMEOUT ! --- arch/arm/cpu/armv7/vf610/global_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/vf610/global_timer.c b/arch/arm/cpu/armv7/vf610/global_timer.c index db5c510b64..ab318fbe4f 100644 --- a/arch/arm/cpu/armv7/vf610/global_timer.c +++ b/arch/arm/cpu/armv7/vf610/global_timer.c @@ -65,7 +65,7 @@ void __udelay(unsigned long usec) u64 wait; start = get_cpu_global_timer(); - wait = (u64)((usec * CLK2MHZ(mxc_get_clock(MXC_BUS_CLK))) >> 2); + wait = (u64)(usec * CLK2MHZ(mxc_get_clock(MXC_BUS_CLK))); do { current = get_cpu_global_timer(); } while ((current - start) < wait); @@ -83,5 +83,5 @@ unsigned long long get_ticks(void) ulong get_tbclk(void) { - return (ulong)(mxc_get_clock(MXC_BUS_CLK) >> 2); + return (ulong)mxc_get_clock(MXC_ARM_CLK); } -- cgit v1.2.3