Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1252707
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: console vs earlycon ? |
| Date | 2015-10-21 12:40 +0200 |
| Message-ID | <qlYYi-hR-9@gated-at.bofh.it> (permalink) |
| References | <qlWWu-5OT-9@gated-at.bofh.it> <qlXSy-7bk-33@gated-at.bofh.it> <qlY2d-7mq-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wednesday 21 October 2015 18:30:05 Masahiro Yamada wrote: > > > >> I am trying to implement OF_EARLYCON_DECLARE() for that. > >> > >> I was just wondering if console_initcall() should work as well. > >> > >> > >> As I said, I noticed the console_initcall() in 8250_core.c > >> only works on very limited platforms. > > > > It works with all those that use of_serial.c, right? > > I doubt it. > > > I have a board with a pure 8250-compat device working. > ( compatible = "ns16550a") > It uses of_serial.c, of course. > > > As far as I tested, it would never enable the console at console_init(). Ok, that sounds like a bug. Peter and others have changed that code a lot in the last year. I wonder if this has never worked then or if it has regressed. > The console is enabled when the UART driver is probed. > (or earlycon if "earlycon" is specified in the kernel-parameter.) Got it. Let me know if you think this interpretation is correct: * univ8250_console_match() looks for the earlycon argument format like "console=uart[8250],io|mmio|mmio32,<addr>[,<options>]", and that would work, but we don't want to have to pass all that data when the information should already be there. * univ8250_console_setup() looks for ports that have been added by one of several other methods (including earlycon) already, but we don't do that on ARM without earlycon being enabled. * arch/powerpc/kernel/legacy_serial.c does everything we need, but does not live in architecture independent code and does a few things that we probably don't need or want there. It relies on scanning the device tree for known UART device nodes before the platform devices are added. * for console_initcall() to do the right thing, we want both the ttyS devices to get added early for console=ttyS1 to work, as well as having the preferred console work based on the stdout-property. * we parse the /chosen/stdout-path property in drivers/of/base and store the device node pointer in the global 'of_stdout' variable, but do not use it until the uart is added by the tty driver and calls of_console_check() to add the default console device. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
console vs earlycon ? Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-10-21 10:30 +0200
Re: console vs earlycon ? Arnd Bergmann <arnd@arndb.de> - 2015-10-21 11:00 +0200
Re: console vs earlycon ? Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-10-21 11:10 +0200
Re: console vs earlycon ? Arnd Bergmann <arnd@arndb.de> - 2015-10-21 11:30 +0200
Re: console vs earlycon ? Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-10-21 11:40 +0200
Re: console vs earlycon ? Arnd Bergmann <arnd@arndb.de> - 2015-10-21 12:40 +0200
Re: console vs earlycon ? Peter Hurley <peter@hurleysoftware.com> - 2015-10-21 16:00 +0200
Re: console vs earlycon ? Arnd Bergmann <arnd@arndb.de> - 2015-10-21 16:20 +0200
Re: console vs earlycon ? Peter Hurley <peter@hurleysoftware.com> - 2015-10-21 17:40 +0200
Re: console vs earlycon ? Arnd Bergmann <arnd@arndb.de> - 2015-10-21 21:10 +0200
Re: console vs earlycon ? Peter Hurley <peter@hurleysoftware.com> - 2015-10-21 21:30 +0200
Re: console vs earlycon ? Arnd Bergmann <arnd@arndb.de> - 2015-10-22 01:00 +0200
Re: console vs earlycon ? Peter Hurley <peter@hurleysoftware.com> - 2015-10-21 15:30 +0200
Re: console vs earlycon ? Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-10-22 06:50 +0200
csiph-web