[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5aadf1a7-51c7-453e-beaa-3df6ceca5354@xen0n.name>
Date: Sat, 16 May 2020 19:09:11 +0800
From: WANG Xuerui <kernel@...0n.name>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Huacai Chen <chenhc@...ote.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>
Cc: linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH] MIPS: Loongson: Add support for serial console
On 5/16/20 3:03 PM, Tiezhu Yang wrote:
> After commit 87fcfa7b7fe6 ("MIPS: Loongson64: Add generic dts"),
> there already exists the node and property of Loongson CPU UART0
> in loongson3-package.dtsi:
>
> cpu_uart0: serial@...001e0 {
> compatible = "ns16550a";
> reg = <0 0x1fe001e0 0x8>;
> clock-frequency = <33000000>;
> interrupt-parent = <&liointc>;
> interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
> no-loopback-test;
> };
>
> In order to support for serial console on the Loongson platform,
> add CONFIG_SERIAL_OF_PLATFORM=y to loongson3_defconfig.
>
> With this patch, we can see the following boot message:
>
> [ 1.877745] printk: console [ttyS0] disabled
> [ 1.881979] 1fe001e0.serial: ttyS0 at MMIO 0x1fe001e0 (irq = 16, base_baud = 2062500) is a 16550A
> [ 1.890838] printk: console [ttyS0] enabled
>
> And also, we can login normally from the serial console.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> ---
>
> Hi Jiaxun,
>
> Thank you very much for your suggestion.
>
> arch/mips/configs/loongson3_defconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/configs/loongson3_defconfig b/arch/mips/configs/loongson3_defconfig
> index 6768c16..cd95f08 100644
> --- a/arch/mips/configs/loongson3_defconfig
> +++ b/arch/mips/configs/loongson3_defconfig
> @@ -217,6 +217,7 @@ CONFIG_SERIAL_8250_EXTENDED=y
> CONFIG_SERIAL_8250_MANY_PORTS=y
> CONFIG_SERIAL_8250_SHARE_IRQ=y
> CONFIG_SERIAL_8250_RSA=y
> +CONFIG_SERIAL_OF_PLATFORM=y
> CONFIG_HW_RANDOM=y
> CONFIG_RAW_DRIVER=m
> CONFIG_I2C_CHARDEV=y
Hi,
The patch title is again exaggerating things. This is a defconfig
change, so please refer to `git log` output of `arch/mips/configs` and
use something like "MIPS: Loongson: loongson3_defconfig: enable serial
console" or "MIPS: Loongson: enable serial console in defconfig". The
current title reads as if Loongson kernels never were able to use a
serial console in the past.
Powered by blists - more mailing lists