]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nios2: enable earlycon support
authorTobias Klauser <tklauser@distanz.ch>
Mon, 3 Apr 2017 03:09:04 +0000 (20:09 -0700)
committerLey Foon Tan <ley.foon.tan@intel.com>
Mon, 8 May 2017 08:59:19 +0000 (16:59 +0800)
commit44a4ed42576da5f3387005a1667cb3e7aedfd687
treed1963ca7e55fc9a21178bd42e30de1a11f3a5b28
parent57ac76ed6c0daf02c520e09e0af421f02ee2de8b
nios2: enable earlycon support

Enable generic earlycon support for nios2. This e.g. allows to use a
8250/16650 UART as earlycon.

In order to get the earlycon, we just need to call parse_early_param()
in early_init_devtree() as soon as the device tree is initially scanned.
By adding an stdout-path property to the dts (done in this patch for
10m50_devboard), the earlycon can be used.

In order to provide early printk support, we need to provide a dummy
implementation of early_console_write(), so that
arch/nios2/kernel/early_printk.c can still be compiled if neither
SERIAL_ALTERA_JTAGUART_CONSOLE nor SERIAL_ALTERA_UART_CONSOLE is
selected. As soon as the altera_uart and altera_jtaguart support
earlycon, the entire file can be removed.

Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
arch/nios2/Kconfig.debug
arch/nios2/boot/dts/10m50_devboard.dts
arch/nios2/kernel/early_printk.c
arch/nios2/kernel/setup.c