Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1198306ybk; Sat, 16 May 2020 04:11:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmbJQXauq8i49trX0lc3uwBiBKetlLvywLWFDgXHuaAp1s+I9uOL3f6Wzxb8pU6DzQQrUK X-Received: by 2002:a05:6402:1558:: with SMTP id p24mr6911052edx.32.1589627495119; Sat, 16 May 2020 04:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589627495; cv=none; d=google.com; s=arc-20160816; b=eitDQeqv/psj+OoM7yTKCrxzQKMyTN9qa2F+VL87nKMr5UVDGZ9czaZ5mInToyFQ/i N9TfzDLaMuHB8zeHwPbqTWPdDTv6bEiP8lzUiJp79oWZFeEcW4Jh6dtlu6xiR+hr0OXr kGHKuTe9PGK0hKVhPIsQufxorworbr5qdw24M3L2/cfIhwwEy45GAz6c7leDL2Dz6v3n IDGiobcBpofAHYe6HvxPWf/WF71j/l9FYwmppw+rkr46Kz34iB7+rK0nIdeFF+my1E4h WaqQ5rHPNoBRzrOBWbBMEO/HJGbfMt/1s7dv5rGQksJqGuH16mQ1BcLrjUSW1TFTiq0M uVww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=/2b7YMM9tQWW+LJL+BFuRblCRqqTMlI5+OjhkJIfZ9I=; b=N7RZIzL5Q6Qu5KWSq6EB9GF6MMmnL2W6ZfyYTTQjeK2iIfzTzfI9WmJEV3Zf5IkfdL 3cmmmCVEe6lyah1J4PbvdkQ0QdD+2xRrbt5BzAijHDKYR7VtRMZURtSEW9WUD0J1C+ZC z6hy8nL8Uy4JHMhRhRFRDWc9IxCD65rXKJCZNO0ah0p6+06JAtWyWWm0NRR8UO/pGZdR 4FK78Mq3GfgrZg1i9xmE9D2UFwJp/HlbTkNy+u+W8cAXUMZvxs//RjMSoUmQt/10QfGa IeNXjOKFy9FEDgAr1Cx13GRHq3DS/t0VZBU06fWma022UiMRQvHfmOtHhghXx1YHTXu1 QLwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@xen0n.name header.s=mail header.b=c4WrpXhn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si2803885edl.600.2020.05.16.04.11.10; Sat, 16 May 2020 04:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@xen0n.name header.s=mail header.b=c4WrpXhn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726242AbgEPLJT (ORCPT + 99 others); Sat, 16 May 2020 07:09:19 -0400 Received: from [115.28.160.31] ([115.28.160.31]:54554 "EHLO mailbox.box.xen0n.name" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1726191AbgEPLJS (ORCPT ); Sat, 16 May 2020 07:09:18 -0400 Received: from [192.168.9.172] (unknown [220.196.60.58]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 982B16012C; Sat, 16 May 2020 19:09:15 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=xen0n.name; s=mail; t=1589627355; bh=4gI8QTkfc0FypidOlx2nl9vtLB55CUSTqHLnKI7O0BI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=c4WrpXhn0qomU+aO//sTSR5tEdSRCqhWqzkdz6EliV8P8+CTm71FAaU347s07W91k pQMm9IOQ4CFz9pyahA5ezOyWFwKYuiAfhnEaWbj5NidCAhJ/AweKNKZPidbg55Qnel YnmzcsDvGHqLUPCMHo/UjpeVGsJR6qJvR1a5zsao= Subject: Re: [PATCH] MIPS: Loongson: Add support for serial console To: Tiezhu Yang , Thomas Bogendoerfer , Huacai Chen , Jiaxun Yang Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li References: <1589612588-29196-1-git-send-email-yangtiezhu@loongson.cn> From: WANG Xuerui Message-ID: <5aadf1a7-51c7-453e-beaa-3df6ceca5354@xen0n.name> Date: Sat, 16 May 2020 19:09:11 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.0a1 MIME-Version: 1.0 In-Reply-To: <1589612588-29196-1-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@1fe001e0 { > 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 > --- > > 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.