All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-serial@vger.kernel.org
Cc: Paul Burton <paul.burton@imgtec.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Jiri Slaby <jslaby@suse.com>, Alan Cox <alan@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Joachim Eastwood <manabian@gmail.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	John Crispin <blogic@openwrt.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 2/2] serial: 8250_ingenic: allow to be independent of SERIAL_8250_CONSOLE
Date: Tue, 27 Oct 2015 10:20:06 -0400	[thread overview]
Message-ID: <562F8816.4030504@hurleysoftware.com> (raw)
In-Reply-To: <1445607076-14135-2-git-send-email-yamada.masahiro@socionext.com>

On 10/23/2015 09:31 AM, Masahiro Yamada wrote:
> 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".

Reviewed-by: Peter Hurley <peter@hurleysoftware.com>

PS - While reviewing this patch, I noticed another problem in the
Ingenic earlycon; see below.

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
> Currently, SERIAL_8250_FSL also depends on SERIAL_8250_CONSOLE,
> but I doubt its necessity.
> 
> 
>  drivers/tty/serial/8250/8250_ingenic.c | 2 ++
>  drivers/tty/serial/8250/Kconfig        | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c
> index 7c1e4be..44633ee 100644
> --- a/drivers/tty/serial/8250/8250_ingenic.c
> +++ b/drivers/tty/serial/8250/8250_ingenic.c
> @@ -34,6 +34,7 @@ struct ingenic_uart_data {
>  
>  #define UART_FCR_UME	BIT(4)
>  
> +#ifdef CONFIG_SERIAL_EARLYCON


>  static struct earlycon_device *early_device;

The earlycon setup should not be saving the earlycon_device *;
see early_8250serial_write() for how to deref from console to port.

Regards,
Peter Hurley


>  static uint8_t __init early_in(struct uart_port *port, int offset)
> @@ -126,6 +127,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)
>  {
> diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
> index 960da95..6f62934 100644
> --- a/drivers/tty/serial/8250/Kconfig
> +++ b/drivers/tty/serial/8250/Kconfig
> @@ -360,7 +360,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
> 

  reply	other threads:[~2015-10-27 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 13:31 [PATCH 1/2] serial: 8250_ingenic: delete redundant "select SERIAL_EARLYCON" Masahiro Yamada
2015-10-23 13:31 ` [PATCH 2/2] serial: 8250_ingenic: allow to be independent of SERIAL_8250_CONSOLE Masahiro Yamada
2015-10-27 14:20   ` Peter Hurley [this message]
2015-12-21 20:15     ` Paul Gortmaker
2015-10-27 14:15 ` [PATCH 1/2] serial: 8250_ingenic: delete redundant "select SERIAL_EARLYCON" Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=562F8816.4030504@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=alan@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=blogic@openwrt.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.