]> git.itanic.dy.fi Git - linux-stable/commit
powerpc: Add support for early debugging via Serial 16550 console
authorPali Rohár <pali@kernel.org>
Mon, 22 Aug 2022 23:15:01 +0000 (01:15 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:09 +0000 (19:22 +1000)
commitb19448fe846baad689ff51a991ebfc74b4b5e0a8
treee3cbb5f13d2ff44608a50a537191bf82ece17da9
parentbd7dc90e52e8db7ee0f38c51bc9047bafb54fe43
powerpc: Add support for early debugging via Serial 16550 console

Currently powerpc early debugging contains lot of platform specific
options, but does not support standard UART / serial 16550 console.

Later legacy_serial.c code supports registering UART as early debug console
from device tree but it is not early during booting, but rather later after
machine description code finishes.

So for real early debugging via UART is current code unsuitable.

Add support for new early debugging option CONFIG_PPC_EARLY_DEBUG_16550
which enable Serial 16550 console on address defined by new option
CONFIG_PPC_EARLY_DEBUG_16550_PHYSADDR and by stride by option
CONFIG_PPC_EARLY_DEBUG_16550_STRIDE.

With this change it is possible to debug powerpc machine descriptor code.
For example this early debugging code can print on serial console also
"No suitable machine description found" error which is done before
legacy_serial.c code.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220822231501.16827-1-pali@kernel.org
arch/powerpc/Kconfig.debug
arch/powerpc/include/asm/udbg.h
arch/powerpc/kernel/udbg.c
arch/powerpc/kernel/udbg_16550.c