]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
serial: 8250_ingenic: allow to be independent of SERIAL_8250_CONSOLE
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 23 Oct 2015 13:31:16 +0000 (22:31 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Dec 2015 03:59:48 +0000 (19:59 -0800)
This UART driver should not depend on the console.  They should be
orthogonal.

Surround the earlycon code with CONFIG_SERIAL_EARLYCON conditional
and rip off "depends on SERIAL_8250_CONSOLE".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_ingenic.c
drivers/tty/serial/8250/Kconfig

index 49394b4c5cfdc947dd2763dcb368bea49e6cf3e0..d6e1ec9b4fdeb7ab8f3efe626d6a2fc0467a4183 100644 (file)
@@ -48,6 +48,7 @@ static const struct of_device_id of_match[];
 #define UART_MCR_MDCE  BIT(7)
 #define UART_MCR_FCM   BIT(6)
 
+#ifdef CONFIG_SERIAL_EARLYCON
 static struct earlycon_device *early_device;
 
 static uint8_t __init early_in(struct uart_port *port, int offset)
@@ -140,6 +141,7 @@ OF_EARLYCON_DECLARE(jz4775_uart, "ingenic,jz4775-uart",
 EARLYCON_DECLARE(jz4780_uart, ingenic_early_console_setup);
 OF_EARLYCON_DECLARE(jz4780_uart, "ingenic,jz4780-uart",
                    ingenic_early_console_setup);
+#endif /* CONFIG_SERIAL_EARLYCON */
 
 static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value)
 {
index 5d6808c226e99a812422bc9b76af2380104745a9..25da430bb58b1a48d0a3e8df84a806bf3ba6fd50 100644 (file)
@@ -361,7 +361,7 @@ config SERIAL_8250_UNIPHIER
 
 config SERIAL_8250_INGENIC
        bool "Support for Ingenic SoC serial ports"
-       depends on SERIAL_8250_CONSOLE && OF_FLATTREE
+       depends on OF_FLATTREE
        select LIBFDT
        help
          If you have a system using an Ingenic SoC and wish to make use of