[MIPS] Deforest the function pointer jungle in the time code.
[firefly-linux-kernel-4.4.55.git] / arch / mips / basler / excite / excite_setup.c
index 42f0eda1d51f1994ff163ae5dca8030f3cf8daf8..68be19d1802efbcbbd7d1dfee772970eb4e5e052 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/tty.h>
 #include <linux/serial_core.h>
 #include <linux/serial.h>
+#include <linux/serial_8250.h>
 #include <linux/ioport.h>
 #include <linux/spinlock.h>
 #include <asm/bootinfo.h>
@@ -63,11 +64,11 @@ volatile void __iomem * const ocd_base = (void *) (EXCITE_ADDR_OCD);
 volatile void __iomem * const titan_base = (void *) (EXCITE_ADDR_TITAN);
 
 /* Protect access to shared GPI registers */
-spinlock_t titan_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(titan_lock);
 int titan_irqflags;
 
 
-static void excite_timer_init(void)
+void __init plat_time_init(void)
 {
        const u32 modebit5 = ocd_readl(0x00e4);
        unsigned int
@@ -260,9 +261,6 @@ void __init plat_mem_setup(void)
        /* Announce RAM to system */
        add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
 
-       /* Set up timer initialization hooks */
-       board_time_init = excite_timer_init;
-
        /* Set up the peripheral address map */
        *(boot_ocd_base + (LKB9 / sizeof (u32))) = 0;
        *(boot_ocd_base + (LKB10 / sizeof (u32))) = 0;