diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-03-31 06:52:09 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-06-03 04:50:09 -0400 |
commit | e87a850b9c92be6a8cf5735c516ec864d65f24dd (patch) | |
tree | 5121fa121b6bd6ce2d6dbed6eee0ac5c213d7fa0 /arch/arc/plat-arcfpga | |
parent | c00bfd974fb0b7a5a501aebada2a94945e38a9a5 (diff) |
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: Chuck Jordan <cjordan@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/plat-arcfpga')
-rw-r--r-- | arch/arc/plat-arcfpga/platform.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arc/plat-arcfpga/platform.c b/arch/arc/plat-arcfpga/platform.c index f09e771b4bbd..61c7e5997387 100644 --- a/arch/arc/plat-arcfpga/platform.c +++ b/arch/arc/plat-arcfpga/platform.c | |||
@@ -79,16 +79,11 @@ static void arc_fpga_serial_init(void) | |||
79 | ARRAY_SIZE(fpga_early_devs)); | 79 | ARRAY_SIZE(fpga_early_devs)); |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * ARC console driver registers itself as an early platform driver | 82 | * ARC console driver registers (build time) as an early platform driver |
83 | * of class "earlyprintk". | 83 | * of class "earlyprintk". However it needs explicit cmdline toggle |
84 | * Install it here, followed by probe of devices. | 84 | * "earlyprintk=ttyARC0" to be successfuly runtime registered. |
85 | * The installation here doesn't require earlyprintk in command line | 85 | * Otherwise the early probe below fails to find the driver |
86 | * To do so however, replace the lines below with | ||
87 | * parse_early_param(); | ||
88 | * early_platform_driver_probe("earlyprintk", 1, 1); | ||
89 | * ^^ | ||
90 | */ | 86 | */ |
91 | early_platform_driver_register_all("earlyprintk"); | ||
92 | early_platform_driver_probe("earlyprintk", 1, 0); | 87 | early_platform_driver_probe("earlyprintk", 1, 0); |
93 | 88 | ||
94 | /* | 89 | /* |