[MIPS] Deforest the function pointer jungle in the time code.
[firefly-linux-kernel-4.4.55.git] / arch / mips / emma2rh / markeins / setup.c
index 7d98fdbf839044ed3872ab7eb26de7dcc8c7ef5b..5e1da53b04a7fdbba100bafc4f124547433a12ea 100644 (file)
@@ -22,7 +22,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -89,7 +88,7 @@ static unsigned int __init detect_bus_frequency(unsigned long rtc_base)
        return clock[reg];
 }
 
-static void __init emma2rh_time_init(void)
+void __init plat_time_init(void)
 {
        u32 reg;
        if (bus_frequency == 0)
@@ -105,7 +104,7 @@ static void __init emma2rh_time_init(void)
        mips_hpt_frequency = (bus_frequency * (4 + reg)) / 4 / 2;
 }
 
-static void __init emma2rh_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* we are using the cpu counter for timer interrupts */
        setup_irq(CPU_IRQ_BASE + 7, irq);
@@ -116,30 +115,6 @@ extern void markeins_irq_setup(void);
 
 static void inline __init markeins_sio_setup(void)
 {
-#ifdef CONFIG_KGDB_8250
-       struct uart_port emma_port;
-
-       memset(&emma_port, 0, sizeof(emma_port));
-
-       emma_port.flags =
-           UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
-       emma_port.iotype = UPIO_MEM;
-       emma_port.regshift = 4; /* I/O addresses are every 8 bytes */
-       emma_port.uartclk = 18544000;   /* Clock rate of the chip */
-
-       emma_port.line = 0;
-       emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3);
-       emma_port.membase = (u8*)emma_port.mapbase;
-       early_serial_setup(&emma_port);
-
-       emma_port.line = 1;
-       emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3);
-       emma_port.membase = (u8*)emma_port.mapbase;
-       early_serial_setup(&emma_port);
-
-       emma_port.irq = EMMA2RH_IRQ_PFUR1;
-       kgdb8250_add_port(1, &emma_port);
-#endif
 }
 
 void __init plat_mem_setup(void)
@@ -149,9 +124,6 @@ void __init plat_mem_setup(void)
 
        set_io_port_base(KSEG1ADDR(EMMA2RH_PCI_IO_BASE));
 
-       board_time_init = emma2rh_time_init;
-       board_timer_setup = emma2rh_timer_setup;
-
        _machine_restart = markeins_machine_restart;
        _machine_halt = markeins_machine_halt;
        pm_power_off = markeins_machine_power_off;