public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Olof Johansson <olofj-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] ARM64: tegra: Add support for Google Pixel C
Date: Thu, 07 Jan 2016 15:11:15 +0100	[thread overview]
Message-ID: <4442990.rM1mk43t6M@wuerfel> (raw)
In-Reply-To: <568E65F0.2070201-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Thursday 07 January 2016 13:19:44 Jon Hunter wrote:
> 
> Adding Arnd.
> 
> Hmmm ... well apparently stdout-path does not work for tegra and in
> order to make this work I had to do the following ...
> 
> 
> [PATCH] serial: 8250: of: Add earlycon support for Tegra
> 
> Currently, early console support only works for Tegra when the serial
> port information is passed via the earlycon boot parameter. If the
> serial port information is specified via device-tree using the
> "stdout-path" then the early console does not work because:
> 
> 1. The tegra serial ports compatibility parameter does not match any
>    of the supported serial drivers for early console.
> 2. The of_setup_earlycon() function assumes that serial port registers
>    are byte aligned and for tegra they are 32-bit aligned.
> 
> Add an early console setup function for tegra so that the early console
> can be specified via the device-tree "stdout-path" variable.
> 
> Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/tty/serial/8250/8250_of.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c
> index 33021c1f7d55..98adf83e83c2 100644
> --- a/drivers/tty/serial/8250/8250_of.c
> +++ b/drivers/tty/serial/8250/8250_of.c
> @@ -44,6 +44,16 @@ void tegra_serial_handle_break(struct uart_port *p)
>                 udelay(1);
>         } while (1);
>  }
> +
> +int __init tegra_earlycon_setup(struct earlycon_device *device,
> +                               const char *options)
> +{
> +       device->port.iotype = UPIO_MEM32;
> +       device->port.regshift = 2;
> +
> +       return early_serial8250_setup(device, options);
> +}
> +OF_EARLYCON_DECLARE(tegra20_uart, "nvidia,tegra20-uart", tegra_earlycon_setup);
>  #else
>  static inline void tegra_serial_handle_break(struct uart_port *port)
>  {
> 
> 
> Arnd, does the above look ok, or should there be a generic
> early_serial8250x32_setup() somewhere?

I think it would be better to put it into 8250_early.c rather than 
8250_of.c, as there are already some other definitions in there,
and the #ifdef CONFIG_TEGRA in 8250_of.c is for some other workaround.

Would it be possible to handle the "reg-io-width" parsing in
early_serial8250_setup instead of keying it off the string?

	Arnd

  parent reply	other threads:[~2016-01-07 14:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06  9:40 [PATCH] ARM64: tegra: Add support for Google Pixel C Jon Hunter
     [not found] ` <1452073222-2956-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-06  9:46   ` Mark Rutland
2016-01-06 12:49     ` Jon Hunter
     [not found]       ` <568D0D70.4020309-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-07 13:19         ` Jon Hunter
     [not found]           ` <568E65F0.2070201-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-07 14:11             ` Arnd Bergmann [this message]
2016-01-07 16:53               ` Jon Hunter
     [not found]                 ` <568E9804.5020503-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-07 17:20                   ` Rob Herring
     [not found]                     ` <CAL_Jsq++DkgJA--40YBqGZd5BJFkzXfKt_st1kN+ZiVY7yb8OA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-07 18:00                       ` Jon Hunter

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=4442990.rM1mk43t6M@wuerfel \
    --to=arnd-r2ngtmty4d4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=olofj-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox