From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Arnd Bergmann <arnd@arndb.de>,
Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arc-linux-dev@synopsys.com" <arc-linux-dev@synopsys.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Rob Herring <rob.herring@calxeda.com>,
Peter Hurley <peter@hurleysoftware.com>
Subject: Re: [PATCH 2/4] ARC: [axs101] support early 8250 uart
Date: Fri, 5 Jun 2015 10:32:19 +0530 [thread overview]
Message-ID: <55712D5B.6090302@synopsys.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075665A0229@IN01WEMBXB.internal.synopsys.com>
+CC linux-serial
On Thursday 14 May 2015 06:34 PM, Vineet Gupta wrote:
> On Thursday 14 May 2015 06:23 PM, Arnd Bergmann wrote:
>
> On Thursday 14 May 2015 15:48:42 Alexey Brodkin wrote:
>
>
>> >
>> > chosen {
>> > - bootargs = "console=tty0 console=ttyS3,115200n8 consoleblank=0";
>> > + bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 console=tty0 console=ttyS3,115200n8 consoleblank=0";
>> > };
>> > };
>> >
>
> When you do earlycon with DT, better use a 'stdout-path' property that points
> to the device, and just put 'earlycon' without arguments on the command line.
>
> Arnd
>
>
> Sure ! I tried that once (3.16) and even the dts patch got merged but had to be reverted out !
>
> 2014-07-27 22524b02b17b Revert "ARC: [arcfpga] stdout-path now suffices for earlycon/console"
>
> Let me see if that works again since serial land has seen some significant churn in recent times
>
> Thx for pointing this out !
so specifying console with stdout-path works for me,
- bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=tty0
console=ttyS0,115200n8 consoleblank=0 debug";
+ bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8";
+ stdout-path = &uart0;
..
But I don't see earlycon working with paramless earlycon
- bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8";
+ bootargs = "earlycon";
stdout-path = &uart0;
And I don't see how it would work for others as of 4.1-rc6
Relevant config items I have are:
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_OF_PLATFORM=y
...
There are 2 earlyparam handlers for earlcon,
(1) param_setup_earlycon() -> setup_earlycon() -> register_console()
(2) setup_of_earlycon() -> early_init_dt_scan_chosen_serial -> of_setup_earlycon()
#1 only works when arg to earlycon is *not NULL*
#2 only works when arg is *NULL*.
For my case, #2 bails out early as __earlycon_of_table happens to be empty.
8071d8a0 T __earlycon_of_table
8071d8a0 000000c4 t __earlycon_of_table_sentinel
This make sense since I don't see any OF_EARLYCON_DECLARE() in 8250 driver.
As a quick hack I added one in 8250/8250_early.c
@@ -152,3 +154,4 @@ static int __init early_serial8250_setup(struct
earlycon_device *device,
}
EARLYCON_DECLARE(uart8250, early_serial8250_setup);
EARLYCON_DECLARE(uart, early_serial8250_setup);
+OF_EARLYCON_DECLARE(uart8250, "ns8250", early_serial8250_setup);
I needed another fine adjustment as of_setup_earlycon() assumes mmio, while it
needs to be memio32 for my case.
@@ -199,7 +199,7 @@ int __init of_setup_earlycon(unsigned long addr,
int err;
struct uart_port *port = &early_console_dev.port;
- port->iotype = UPIO_MEM;
+ port->iotype = UPIO_MEM32;
With this paramless earlycon works.
Now both the above are hacks, but I want to understand if I'm missing something in
ARC port or does core need some adjustments along the lines of above, since
presumably others have it working !
P.S. with respect to the original patch, I would fold it into for-next with change
to stdout-path and keep earlycon as before - we can fix it up later.
Thx,
-vineet
next prev parent reply other threads:[~2015-06-05 5:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 12:48 [PATCH 0/4] arc: add AXS101 board support Alexey Brodkin
2015-05-14 12:48 ` [PATCH 1/4] ARC: [axs101] Add support for AXS101 SDP (software development platform) Alexey Brodkin
2015-05-14 12:48 ` [PATCH 2/4] ARC: [axs101] support early 8250 uart Alexey Brodkin
2015-05-14 12:53 ` Arnd Bergmann
2015-05-14 13:04 ` Vineet Gupta
2015-06-05 5:02 ` Vineet Gupta [this message]
2015-06-05 13:01 ` console setting via stdout-path vs console=xxx (was Re: [PATCH 2/4] ARC: [axs101] support early 8250 uart) Vineet Gupta
2015-06-05 13:01 ` Vineet Gupta
2015-06-05 13:01 ` Vineet Gupta
2015-05-14 12:48 ` [PATCH 3/4] ARC: [axs101] Tweak DDR port aperture mappings for performance Alexey Brodkin
2015-05-14 12:48 ` [PATCH 4/4] ARC: [axs101] STAR 9000799830: Fix SD cards support Alexey Brodkin
2015-06-05 14:13 ` [PATCH 0/4] arc: add AXS101 board support Vineet Gupta
2015-06-05 14:13 ` Vineet Gupta
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=55712D5B.6090302@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=arc-linux-dev@synopsys.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=rob.herring@calxeda.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.