From: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@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"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] ARM64: tegra: Add support for Google Pixel C
Date: Thu, 7 Jan 2016 18:00:56 +0000 [thread overview]
Message-ID: <568EA7D8.1060305@nvidia.com> (raw)
In-Reply-To: <CAL_Jsq++DkgJA--40YBqGZd5BJFkzXfKt_st1kN+ZiVY7yb8OA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 07/01/16 17:20, Rob Herring wrote:
> On Thu, Jan 7, 2016 at 10:53 AM, Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>
>> On 07/01/16 14:11, Arnd Bergmann wrote:
>>> On Thursday 07 January 2016 13:19:44 Jon Hunter wrote:
>
> [...]
>
>> Ok so something like this ...
>>
>> diff --git a/drivers/tty/serial/8250/8250_early.c
>> b/drivers/tty/serial/8250/8250_early.c
>> index af62131af21e..4ce6e2b57534 100644
>> --- a/drivers/tty/serial/8250/8250_early.c
>> +++ b/drivers/tty/serial/8250/8250_early.c
>> @@ -141,7 +141,18 @@ int __init early_serial8250_setup(struct
>> earlycon_device *device,
>> device->con->write = early_serial8250_write;
>> return 0;
>> }
>> +
>> +int __init early_serial8250_mem32_setup(struct earlycon_device *device,
>> + const char *options)
>> +{
>> + device->port.iotype = UPIO_MEM32;
>> + device->port.regshift = 2;
>> +
>> + return early_serial8250_setup(device, options);
>> +}
>> EARLYCON_DECLARE(uart8250, early_serial8250_setup);
>> EARLYCON_DECLARE(uart, early_serial8250_setup);
>> OF_EARLYCON_DECLARE(ns16550, "ns16550", early_serial8250_setup);
>> OF_EARLYCON_DECLARE(ns16550a, "ns16550a", early_serial8250_setup);
>> +OF_EARLYCON_DECLARE(tegra20_uart, "nvidia,tegra20-uart",
>> + early_serial8250_mem32_setup);
>>
>>> Would it be possible to handle the "reg-io-width" parsing in
>>> early_serial8250_setup instead of keying it off the string?
>>
>> Good point. I spent a bit of time looking at this, but I cannot see an
>> easy way to do this unless we check for "reg-io-width" and "reg-shift"
>> in early_init_dt_scan_chosen_serial() and pass to of_setup_earlycon(),
>> however, I am guessing that this would not be ideal as this would happen
>> for non-8250 devices. May be that would be ok, but I am not sure.
>
> There's been one attempt[1] already. It had a few issues easily
> solved, but I haven't seen a follow-up.
Thanks. Adding Paul.
Paul, are you planning a follow-up to your patch? Otherwise, I am happy
to have crack at it. Don't we also need to read the "reg-shift"?
Cheers
Jon
WARNING: multiple messages have this Message-ID (diff)
From: jonathanh@nvidia.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM64: tegra: Add support for Google Pixel C
Date: Thu, 7 Jan 2016 18:00:56 +0000 [thread overview]
Message-ID: <568EA7D8.1060305@nvidia.com> (raw)
In-Reply-To: <CAL_Jsq++DkgJA--40YBqGZd5BJFkzXfKt_st1kN+ZiVY7yb8OA@mail.gmail.com>
On 07/01/16 17:20, Rob Herring wrote:
> On Thu, Jan 7, 2016 at 10:53 AM, Jon Hunter <jonathanh@nvidia.com> wrote:
>>
>> On 07/01/16 14:11, Arnd Bergmann wrote:
>>> On Thursday 07 January 2016 13:19:44 Jon Hunter wrote:
>
> [...]
>
>> Ok so something like this ...
>>
>> diff --git a/drivers/tty/serial/8250/8250_early.c
>> b/drivers/tty/serial/8250/8250_early.c
>> index af62131af21e..4ce6e2b57534 100644
>> --- a/drivers/tty/serial/8250/8250_early.c
>> +++ b/drivers/tty/serial/8250/8250_early.c
>> @@ -141,7 +141,18 @@ int __init early_serial8250_setup(struct
>> earlycon_device *device,
>> device->con->write = early_serial8250_write;
>> return 0;
>> }
>> +
>> +int __init early_serial8250_mem32_setup(struct earlycon_device *device,
>> + const char *options)
>> +{
>> + device->port.iotype = UPIO_MEM32;
>> + device->port.regshift = 2;
>> +
>> + return early_serial8250_setup(device, options);
>> +}
>> EARLYCON_DECLARE(uart8250, early_serial8250_setup);
>> EARLYCON_DECLARE(uart, early_serial8250_setup);
>> OF_EARLYCON_DECLARE(ns16550, "ns16550", early_serial8250_setup);
>> OF_EARLYCON_DECLARE(ns16550a, "ns16550a", early_serial8250_setup);
>> +OF_EARLYCON_DECLARE(tegra20_uart, "nvidia,tegra20-uart",
>> + early_serial8250_mem32_setup);
>>
>>> Would it be possible to handle the "reg-io-width" parsing in
>>> early_serial8250_setup instead of keying it off the string?
>>
>> Good point. I spent a bit of time looking at this, but I cannot see an
>> easy way to do this unless we check for "reg-io-width" and "reg-shift"
>> in early_init_dt_scan_chosen_serial() and pass to of_setup_earlycon(),
>> however, I am guessing that this would not be ideal as this would happen
>> for non-8250 devices. May be that would be ok, but I am not sure.
>
> There's been one attempt[1] already. It had a few issues easily
> solved, but I haven't seen a follow-up.
Thanks. Adding Paul.
Paul, are you planning a follow-up to your patch? Otherwise, I am happy
to have crack at it. Don't we also need to read the "reg-shift"?
Cheers
Jon
next prev parent reply other threads:[~2016-01-07 18:00 UTC|newest]
Thread overview: 16+ 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
2016-01-06 9:40 ` 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 9:46 ` Mark Rutland
2016-01-06 12:49 ` Jon Hunter
2016-01-06 12:49 ` Jon Hunter
[not found] ` <568D0D70.4020309-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-07 13:19 ` Jon Hunter
2016-01-07 13:19 ` Jon Hunter
[not found] ` <568E65F0.2070201-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-07 14:11 ` Arnd Bergmann
2016-01-07 14:11 ` Arnd Bergmann
2016-01-07 16:53 ` Jon Hunter
2016-01-07 16:53 ` Jon Hunter
[not found] ` <568E9804.5020503-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-07 17:20 ` Rob Herring
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 [this message]
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=568EA7D8.1060305@nvidia.com \
--to=jonathanh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=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=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=paul.burton-1AXoQHu6uovQT0dZR+AlfA@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 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.