Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252621

Re: console vs earlycon ?

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: console vs earlycon ?
Date 2015-10-21 11:30 +0200
Message-ID <qlXSy-7bk-33@gated-at.bofh.it> (permalink)
References <qlWWu-5OT-9@gated-at.bofh.it> <qlXpw-6nw-11@gated-at.bofh.it> <qlXzc-6P0-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wednesday 21 October 2015 18:09:33 Masahiro Yamada wrote:
> Hi Arnd,
> 
> 
> 2015-10-21 17:57 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> > On Wednesday 21 October 2015 17:21:07 Masahiro Yamada wrote:
> >> Hi.
> >>
> >>
> >>
> >>
> >> I think there are three places where console could be enabled.
> >>
> >> [1] earlycon
> >>
> >> Each driver entry is declared with
> >> EARLYCON_DECLARE()  or OF_EARLYCON_DECLARE()
> >>
> >>
> >>
> >> [2] console_init()
> >>
> >> Each entry is declared with  console_initcall()
> >>
> >>
> >>
> >> [3]  when driver is probed
> >> The console is usually enabled at this point
> >> unless some special treatment is done.
> >>
> >>
> >>
> >>
> >> My question is about [2].
> >>
> >> I am using 8250-ish UART device.
> >>
> >>
> >> I noticed univ8250_console_match() and univ8250_console_setup()
> >> always fail at the point of [2] unless early_serial_setup() has been
> >> called in advance;
> >> however, it looks like early_serial_setup() is only used for old platforms.
> >>
> >> So, console cannot be enabled at [2] for modern platforms.
> >>
> >>
> >> My questions are:
> >>
> >>  -  Given that earlycon can be now available for major architectures such ARM,
> >>      [2] will be deprecated at some point in the future?
> >>
> >>  - I am implementing  earlycon  for my own UART driver.
> >>    Is it meaningless to implement  console_initcall()  as well as earlycon?
> >
> > I would still do both. We don't enable earlycon by default at the moment,
> > and I'd say things should remain working with just console_initcall().
> >
> > How closely related to 8250 is your hardware? If it's not all that different,
> > you should probably reuse the existing driver.
> 
> 
> Very close.
> It is already in the mainline.
> 
> drivers/tty/serial/8250/8250_uniphier.c
> 
> The core parts are shared with 8250_core.c

Ok, but I guess no close enough that it makes sense to use drivers/serial/of_serial.c


> 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 think they are
the majority.

	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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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