]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
x86: Move i8254_init() to x86_cpu_init_f()
authorBin Meng <bmeng.cn@gmail.com>
Wed, 9 Dec 2015 01:31:39 +0000 (17:31 -0800)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 9 Dec 2015 09:44:44 +0000 (17:44 +0800)
Right now i8254_init() is called from timer_init() in the tsc timer
driver. But actually i8254 and tsc are completely different things.
Since tsc timer has been converted to driver model, we should find
a new place that is appropriate for U-Boot to call i8254_init(),
which is now x86_cpu_init_f().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/cpu.c
drivers/timer/tsc_timer.c

index 1707993409875e3ea8c9496c7e4c23b8b47cd53c..381d83526fbf63612f0fa8d27197a8e8af2fed6a 100644 (file)
@@ -399,6 +399,11 @@ int x86_cpu_init_f(void)
                }
        }
 
+#ifdef CONFIG_I8254_TIMER
+       /* Set up the i8254 timer if required */
+       i8254_init();
+#endif
+
        return 0;
 }
 
index 6aa243723bec1a0116ac0ea182d2b34cc6a816d6..5c4ec0018f6860a622d409a6aefd559e2a9496c2 100644 (file)
@@ -325,16 +325,6 @@ void __udelay(unsigned long usec)
 #endif
 }
 
-int timer_init(void)
-{
-#ifdef CONFIG_I8254_TIMER
-       /* Set up the i8254 timer if required */
-       i8254_init();
-#endif
-
-       return 0;
-}
-
 static int tsc_timer_get_count(struct udevice *dev, u64 *count)
 {
        u64 now_tick = rdtsc();