MIPS: Malta: malta-time: Ensure GIC counter is running
authorMarkos Chandras <markos.chandras@imgtec.com>
Mon, 23 Mar 2015 12:32:03 +0000 (12:32 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 31 Mar 2015 10:04:13 +0000 (12:04 +0200)
Start the GIC counter before we try to determine its frequency.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9596/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mti-malta/malta-time.c

index 7d4b865715645ed4dc0085f17715114b4c26f4fc..185e68261f45937eae2b17dcd502420ce0121f69 100644 (file)
@@ -87,8 +87,10 @@ static void __init estimate_frequencies(void)
 
        /* Initialize counters. */
        start = read_c0_count();
-       if (gic_present)
+       if (gic_present) {
+               gic_start_count();
                gicstart = gic_read_count();
+       }
 
        /* Read counter exactly on falling edge of update flag. */
        while (CMOS_READ(RTC_REG_A) & RTC_UIP);