Commit 4828d5c3 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Kroah-Hartman

serial: 8250_ingenic: allow to be independent of SERIAL_8250_CONSOLE

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fbccaca9
...@@ -48,6 +48,7 @@ static const struct of_device_id of_match[]; ...@@ -48,6 +48,7 @@ static const struct of_device_id of_match[];
#define UART_MCR_MDCE BIT(7) #define UART_MCR_MDCE BIT(7)
#define UART_MCR_FCM BIT(6) #define UART_MCR_FCM BIT(6)
#ifdef CONFIG_SERIAL_EARLYCON
static struct earlycon_device *early_device; static struct earlycon_device *early_device;
static uint8_t __init early_in(struct uart_port *port, int offset) static uint8_t __init early_in(struct uart_port *port, int offset)
...@@ -140,6 +141,7 @@ OF_EARLYCON_DECLARE(jz4775_uart, "ingenic,jz4775-uart", ...@@ -140,6 +141,7 @@ OF_EARLYCON_DECLARE(jz4775_uart, "ingenic,jz4775-uart",
EARLYCON_DECLARE(jz4780_uart, ingenic_early_console_setup); EARLYCON_DECLARE(jz4780_uart, ingenic_early_console_setup);
OF_EARLYCON_DECLARE(jz4780_uart, "ingenic,jz4780-uart", OF_EARLYCON_DECLARE(jz4780_uart, "ingenic,jz4780-uart",
ingenic_early_console_setup); ingenic_early_console_setup);
#endif /* CONFIG_SERIAL_EARLYCON */
static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value) static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value)
{ {
......
...@@ -361,7 +361,7 @@ config SERIAL_8250_UNIPHIER ...@@ -361,7 +361,7 @@ config SERIAL_8250_UNIPHIER
config SERIAL_8250_INGENIC config SERIAL_8250_INGENIC
bool "Support for Ingenic SoC serial ports" bool "Support for Ingenic SoC serial ports"
depends on SERIAL_8250_CONSOLE && OF_FLATTREE depends on OF_FLATTREE
select LIBFDT select LIBFDT
help help
If you have a system using an Ingenic SoC and wish to make use of If you have a system using an Ingenic SoC and wish to make use of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment