[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200126131238.c65zj3wo3srafa7z@wunner.de>
Date: Sun, 26 Jan 2020 14:12:38 +0100
From: Lukas Wunner <lukas@...ner.de>
To: matthias.bgg@...nel.org
Cc: gregkh@...uxfoundation.org, jslaby@...e.com,
nsaenzjulienne@...e.de, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
Matthias Brugger <mbrugger@...e.com>,
Florian Fainelli <f.fainelli@...il.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Stephen Boyd <swboyd@...omium.org>,
bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH] serial: 8250_early: Add earlycon for BCM2835 aux uart
On Sun, Jan 26, 2020 at 01:33:14PM +0100, matthias.bgg@...nel.org wrote:
> +#ifdef CONFIG_SERIAL_8250_CONSOLE
> +
> +static int __init early_bcm2835aux_setup(struct earlycon_device *device,
> + const char *options)
> +{
> + if (!device->port.membase)
> + return -ENODEV;
> +
> + device->port.iotype = UPIO_MEM32;
> + device->port.regshift = 2;
> +
> + return early_serial8250_setup(device, NULL);
> +}
> +
> +OF_EARLYCON_DECLARE(bcm2835aux, "brcm,bcm2835-aux-uart",
> + early_bcm2835aux_setup);
> +#endif
Does this really work? I also tried to get it working recently and
the system just hung on boot. Looking at it with a JTAG debugger
showed that the bcm2835aux registers were inaccessible because
the mini UART wasn't enabled in the AUXENB register.
Maybe if you use OF_EARLYCON_DECLARE, the firmware recognizes that
serial1 is set as stdout-path and performs enablement of the mini UART?
Or are you using U-Boot which perhaps does the enablement?
I also saw in the JTAG debugger that the uartclk member contained
an incorrect value, so I'd expect that it has to be set as well in
early_bcm2835aux_setup().
I'll see to it that I give this patch a whirl when I return to the
office next week.
Thanks,
Lukas
Powered by blists - more mailing lists