Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751410AbbEDV6n (ORCPT ); Mon, 4 May 2015 17:58:43 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:33207 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbbEDV6f (ORCPT ); Mon, 4 May 2015 17:58:35 -0400 Date: Mon, 4 May 2015 23:58:32 +0200 From: Robert Schwebel To: Peter Hurley Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: earlycon: no match? Message-ID: <20150504215832.GW15254@pengutronix.de> References: <20150503211054.GR15254@pengutronix.de> <55477BC1.6000805@hurleysoftware.com> <20150504194229.GR15254@pengutronix.de> <5547D4DB.8060300@hurleysoftware.com> <20150504205241.GT15254@pengutronix.de> <5547E447.9020604@hurleysoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5547E447.9020604@hurleysoftware.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 23:33:37 up 49 days, 9:25, 78 users, load average: 0,02, 0,11, 0,13 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: rsc@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6084 Lines: 128 On Mon, May 04, 2015 at 05:27:35PM -0400, Peter Hurley wrote: > As I understand you, > > 1. you have CONFIG_SERIAL_EARLYCON=y > 2. but you don't specify an earlycon > 3. so no earlycon starts. > 4. your command line includes "console=ttyAMA0,115200n8" > 5. and a console starts on that port (yes?) > > I don't see a regression here from any previous kernel; this is exactly > the same behavior as before, so what is broken? It outputs a warning message "no match" because it assumes that "ttyAMA0" (specified in the console= entry on the kernel commandline) matches with "pl011", coming from OF_EARLYCON_DECLARE for the serial driver. I don't understand how this is supposed to work: it will *never* match, right? You say it is a diagnostics message that indicates a misspelling. I fail to see what is misspelled, so what does it diagnose? > > In order to let you better understand the setup here: My AM335x device > > (same CPU as on BeagleBone) is a headless embedded system, the only > > input/output device it has is a serial port. No display, no touch. For > > development, a pretty similar system is simulated in QEMU, with > > vexpress. > > > > Until recently, specifying "console=ttyAMA0" was the correct way to get > > the kernel + userspace output out of that serial line. On ARM, there was > > no "early" mechanism, only early_printk. > > > > I wouldn't mind if your citation from kernel-parameters above was true > > and I could get an (early and non-early) serial console with a unified > > "console=ttyAMA0". > > > > However, it doesn't work, as "ttyAMA0" doesn't match "pl011". > > The AM335x does not have a AMBA pl011 port, so "console=ttyAMA0,..." has no > effect on that hardware, and never has. Something else is providing console > on that setup. Please attach your entire dmesg log for that setup. Hardware 1: AM335x drivers/serial/tty/omap-serial.c console=ttyO2,115200n8 Hardware 2: QEMU/vexpress drivers/serial/tty/amba-pl011.c console=ttyAMA0,38400 The same kernel runs on both platforms. Let's just discuss the 2nd case for now, with ttyAMA0 (which is pl011), which has earlycon support and registers here: http://lxr.free-electrons.com/source/drivers/tty/serial/amba-pl011.c#L2129 > > So I'm doing the right thing here, and it doesn't work. > > I'm not sure what you mean by "it doesn't work". > Are you saying that the serial console is not starting? The serial console is starting. It claims that earlycon has "no match", while the correct serial device is specified. How do you suggest this is supposed to be used in the pl011 case, without the "diagnostic message" triggering that says "no match"? Here is the full serial console log (directed to qemu's stdout): ----------8<----------8<----------8<----------8<----------8<---------- rsc@callisto:OSELAS.BSP-GF$ configs/platform-gf/run [ 0.000000] Linux version 4.1.0-rc1+ (rsc@callisto) (gcc version 4.8.3 20131111 (prerelease) (OSELAS.Toolchain-2013.12.2 linaro-4.8-2013.11) ) #10 PREEMPT Mon May 4 23:03:27 CEST 2015 [ 0.000000] earlycon: no match for ttyAMA0,38400n8 [ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rootfs=ext2 rw mem=1024M console=ttyAMA0,38400n8 loglevel=6 rootwait rootfstype=ext4 [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xef800000 ( 760 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc0674ed4 (6580 kB) [ 0.000000] .init : 0xc0675000 - 0xc06b2000 ( 244 kB) [ 0.000000] .data : 0xc06b2000 - 0xc06fd3e8 ( 301 kB) [ 0.000000] .bss : 0xc0700000 - 0xc073a5d8 ( 234 kB) [ 0.000000] L2C: platform modifies aux control register: 0x02020000 -> 0x02420000 [ 0.000000] L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000 [ 0.425170] platform 10000000.sysreg: Error -2 creating of_node link [ 0.429607] platform basic-mmio-gpio.1.auto: Error -2 creating of_node link [ 0.429959] platform basic-mmio-gpio.2.auto: Error -2 creating of_node link [ 0.430561] platform basic-mmio-gpio.3.auto: Error -2 creating of_node link [ 0.604531] of_amba_device_create(): amba_device_add() failed (-19) for /memory-controller@100e0000 [ 0.605709] of_amba_device_create(): amba_device_add() failed (-19) for /memory-controller@100e1000 [ 0.606411] of_amba_device_create(): amba_device_add() failed (-19) for /watchdog@100e5000 [ 0.620892] of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@7,00000000/sysctl@01000 [ 0.633512] of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@7,00000000/wdt@0f000 [ 0.725997] SCSI subsystem initialized [ 0.796591] NFS: Registering the id_resolver key type [ 0.797533] Key type id_resolver registered [ 0.797758] Key type id_legacy registered [ 0.998780] Key type dns_resolver registered [ 1.403497] random: nonblocking pool is initialized Welcome to PTXdist / af inventions-GF! [ OK ] Created slice Root Slice. [ OK ] Listening on Journal Socket (/dev/log). [ OK ] Listening on udev Kernel Socket. <...> ----------8<----------8<----------8<----------8<----------8<---------- rsc -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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/