From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754134AbbJUI5U (ORCPT ); Wed, 21 Oct 2015 04:57:20 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:50298 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753786AbbJUI5R (ORCPT ); Wed, 21 Oct 2015 04:57:17 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Masahiro Yamada , linux-serial@vger.kernel.org, Peter Hurley , Stefan Agner , Linux Kernel Mailing List Subject: Re: console vs earlycon ? Date: Wed, 21 Oct 2015 10:57:07 +0200 Message-ID: <5490668.HV7UIzY6eu@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:kANorbReF53/QbCU4oFoNGXEjU45pVFaqlyzd14QyUDiFBQn4yI xBd3M8S9baMw6gTmihgaKYiacIlFaDRLK7OtFSIu/r4hpzGHWx0iPYi0bhS42I78k/7u9V5 9wjIvGuppILtJtwMV5xYlZL5xa5Q2XUuFMFc0m5yLCGZP8Tfz4YdGLkDj4OLTI6pIEpoKXa p5j0oiiJgymnGk8M7lpyg== X-UI-Out-Filterresults: notjunk:1;V01:K0:cEckb/rwou4=:+3e2qs978Kl7txXvkgaGHo gqqmBQ9mTE4wLiZO1/ybl5yRogncZ4N82zlbaVv4QJ68i4wJ771vyo799igpiPF78zRmyCyIa +ozQnax/uBz5MyB1A8ggh3dPPlgeHY88c9OoXVP5MVuAeFXYUTGzQFOwUQcUj+MpVbvLhF7zY zcFpCDRyfsEI3MhLNFqqde6N/+Lg4XAcatiO9vGgIHIaVeDMe4N1B7u8PsTuVudJYWI2GtFaH 1qdFZ4W8Rpqg42LAkV8o3+UOpWrcCnObCD+ySGE/cLp/Oi/k4213IMI5KvHYxhhN1xySqnfNI NwtGtOQNfyGq0GTwlSwQMkO/U+/Np16E6BlfedKxJSfUZ6W8u4X/NGbrlUFEHGcofE2pFYMMz DA9o/Ig/68/VTmsP+tFlLNK2nzuMZyR2w5KXaRobTVKKSnHKIGcuSWXX1svdA9bmtNER9WHQ2 zMu17nm3Gbndbh9BohIAZ8YhvgEsj9TVzyduKuFXxNwd1y5gHX3uKXQ9FJv40DrGpvJ4XT20Q 0Ryu0ZvXL/rFUiFw/JyUr7sm4F/uus0gqS/U1lBYBL6/hY5etlEfaI4ZiP1BpGv63K3sSnIx3 CkD2hc/CFxgXzMeJl5loD5ZR6F6TczAk5ekYGnE/fvUR9bckNi7zCh4bstj5SKGQmFrzdBFQG iFMmbX+jt79NbNHHVXxh5m36bmbK1cJZW6hGyi5K+embWCQ0m4Fl8OmddRd12KPMU5KgyZl3x t0Zs6BCg5UANZjrl Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Arnd