SERIAL: 8250: Remove SERIAL_8250_AU1X00
[firefly-linux-kernel-4.4.55.git] / arch / mips / alchemy / common / platform.c
index 2580e77624d2072b4637b28eb32f5deb5053c1c0..c233d64a0d6059f8a5b35c9cdb5af5cf14a3c38b 100644 (file)
@@ -33,7 +33,6 @@
        }
 
 static struct plat_serial8250_port au1x00_uart_data[] = {
-#if defined(CONFIG_SERIAL_8250_AU1X00)
 #if defined(CONFIG_SOC_AU1000)
        PORT(UART0_PHYS_ADDR, AU1000_UART0_INT),
        PORT(UART1_PHYS_ADDR, AU1000_UART1_INT),
@@ -54,7 +53,6 @@ static struct plat_serial8250_port au1x00_uart_data[] = {
        PORT(UART0_PHYS_ADDR, AU1200_UART0_INT),
        PORT(UART1_PHYS_ADDR, AU1200_UART1_INT),
 #endif
-#endif /* CONFIG_SERIAL_8250_AU1X00 */
        { },
 };
 
@@ -435,20 +433,21 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
 static int __init au1xxx_platform_init(void)
 {
        unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
-       int i;
+       int err, i;
 
        /* Fill up uartclk. */
        for (i = 0; au1x00_uart_data[i].flags; i++)
                au1x00_uart_data[i].uartclk = uartclk;
 
+       err = platform_add_devices(au1xxx_platform_devices,
+                                  ARRAY_SIZE(au1xxx_platform_devices));
 #ifndef CONFIG_SOC_AU1100
        /* Register second MAC if enabled in pinfunc */
-       if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
+       if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
                platform_device_register(&au1xxx_eth1_device);
 #endif
 
-       return platform_add_devices(au1xxx_platform_devices,
-                                   ARRAY_SIZE(au1xxx_platform_devices));
+       return err;
 }
 
 arch_initcall(au1xxx_platform_init);