Commit e87a850b authored by Vineet Gupta's avatar Vineet Gupta

ARC: [arcfpga] Early ARC UART to be only activated by cmdline

Earlier CONFIG_SERIAL_ARC_CONSOLE would unconditionally enable the
legacy ARC UART based early console even if platform lacked that UART
(e.g. nSIM OSCI platform).

So a multi-platform image containing the 2 UART drivers won't work.

Fix that by probing the driver only if "earlyprintk=ttyARC0" is present
in cmdline.
Reported-by: default avatarChuck Jordan <cjordan@synopsys.com>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent c00bfd97
...@@ -17,7 +17,7 @@ / { ...@@ -17,7 +17,7 @@ / {
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
chosen { chosen {
bootargs = "console=ttyARC0,115200n8"; bootargs = "console=ttyARC0,115200n8 earlyprintk=ttyARC0";
}; };
aliases { aliases {
......
...@@ -79,16 +79,11 @@ static void arc_fpga_serial_init(void) ...@@ -79,16 +79,11 @@ static void arc_fpga_serial_init(void)
ARRAY_SIZE(fpga_early_devs)); ARRAY_SIZE(fpga_early_devs));
/* /*
* ARC console driver registers itself as an early platform driver * ARC console driver registers (build time) as an early platform driver
* of class "earlyprintk". * of class "earlyprintk". However it needs explicit cmdline toggle
* Install it here, followed by probe of devices. * "earlyprintk=ttyARC0" to be successfuly runtime registered.
* The installation here doesn't require earlyprintk in command line * Otherwise the early probe below fails to find the driver
* To do so however, replace the lines below with
* parse_early_param();
* early_platform_driver_probe("earlyprintk", 1, 1);
* ^^
*/ */
early_platform_driver_register_all("earlyprintk");
early_platform_driver_probe("earlyprintk", 1, 0); early_platform_driver_probe("earlyprintk", 1, 0);
/* /*
......
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