Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1230054pxb; Wed, 10 Feb 2021 03:30:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5YcLn8HQRGogdQGhKAZ+ekkW6NbSiEPZ6vTmYiKzr44KJ94yZp7VkVCtvxTawLVGTjbWK X-Received: by 2002:a05:6402:38d:: with SMTP id o13mr2650937edv.155.1612956606790; Wed, 10 Feb 2021 03:30:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612956606; cv=none; d=google.com; s=arc-20160816; b=dhvWfm11hR/mkJLMQcpJeLJR/DeLt9/ixhL+jU7y45b3cdtU6zAffEqt4PgDU8vPjX YFPGObtI43koVFOE79q5Fv8kITmzbTR4ZNyD3f7Ox15C5oOJ5rlQ6OnegwrjRmOT9a9s VtrVbQwHOCGfNC0AKdThYzRoSVNzDvmr0f7FMzSnHUGJxO4OiHTgxOQ/BF1ytB8HVN78 oQTE2UpL5ToJnLpx08Vr1xRBJN6hgZl6lNht1Bd5ULfo5JT8l5hLbLFv8Sp7NXZD8D3q R4QibtfxCbPPt99FHPTkJRd7WQnJMVF28LnfgKi096nGmcd0arrtvXKyg5xLRPIsPQXt nUIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature:dkim-signature; bh=WCNhaAAaBk9KdSN70j1Xv1565gVpc6Vx6H+1sDQrl3g=; b=XXhl2xBg9KsTIRRWd3I8AXUG2q7D7CgkslIqH6UtAX7om1umOjOE4GpRw7oLRaZitK OuiEEZ631RXqwOb60RmHaluxYoALRoGFgB8TwW6OhB765F7Xq2LFmujMYVE/kn8MJLtt LV95BPykMOYLbie4BM6SggUqGIP6i4lnjf6Gq8Z+RTUn5NwIqZ/B2v3mL+UWCQcSyNgL rRsoX1q25vJid+40qpVpaO3l/i+MFaMuykCb5jc7yydUN75evd9B42GJkdUGi1E0GG4O 9y+n/JPpDkslzLJSSlktffeGCcxsCAGAuyDI5TrKzBj2ObF0gwn1CN98v0wTq7Wimek9 LCtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=rAekFHw7; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=d6jWdK3d; 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 jt18si1081335ejb.633.2021.02.10.03.29.42; Wed, 10 Feb 2021 03:30:06 -0800 (PST) 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=pass header.i=@flygoat.com header.s=fm1 header.b=rAekFHw7; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=d6jWdK3d; 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 S230448AbhBJL2r (ORCPT + 99 others); Wed, 10 Feb 2021 06:28:47 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41179 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231363AbhBJLTt (ORCPT ); Wed, 10 Feb 2021 06:19:49 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9C9405C01A8; Wed, 10 Feb 2021 06:18:47 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute6.internal (MEProxy); Wed, 10 Feb 2021 06:18:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=WCNhaAAaBk9KdSN70j1Xv1565gVpc6V x6H+1sDQrl3g=; b=rAekFHw7nm66D/0P2kTycMJo52xReIKj2V0BF4vYDRVVf+G JY506sn0c5iZ9Q46VBTcsEeSBGUcFfdOScuww6lSsMDaI38QEMeVjQvglzt/uAnU FLmDbp9kFaZ4nbf4qp5wpN/svDFGGJk0NLdyRrr32GtbkTDYVHckYJi1zhy+6FMy CLCcZ2tlbP/GHqPqy/PK9A1DB9H086QiPbCue8JqgktXIWH+31jozMLAmVeZ4DEF et20cEX+lCRW+n92xgxC5Pm2lF2jsLUZuadz7CB/ZfclQn9ElPmqelHZH9MnQSu6 RxrV8BZuUcLSAu7HuciPlWUL+aAzBXDpmaCTk2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=WCNhaA AaBk9KdSN70j1Xv1565gVpc6Vx6H+1sDQrl3g=; b=d6jWdK3d1S/AswISiq/HLS nOIJeJwga1VgGPj+1PdoeKRkVywD0XtORFvycKb5G60Dm4dZw/JsiyEDUiIibgk3 Ou7JRZj7/CoqXx+lQv14Qm9NWISpFBACRGcOyS/WCn4S4smgbGtD/o0XIzZwNwGB 2/jMFX5kj70IvA5PaM43IGUfUu7cV0+hQrq6l55n9DI800zzQCtGXmolEc6dLHyy Ti8IzlqCz9HJzAEsZQQc/33YuJM12GnWaJgGWOtWVq893JIbHTMB3s0q9489UzxL REMak7rS0xtTb0HmHb75e//JneEQzkI5Kdu31I/+JvRsPGfsic23m5s5As2/dwNQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheejgddviecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedflfhirgig uhhnucgjrghnghdfuceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqne cuggftrfgrthhtvghrnhepkeelheethfehffdttdelieevfeeiheeuudeifeeugeeuieel iedtueejheehhedunecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilh hfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 61E70130005D; Wed, 10 Feb 2021 06:18:47 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-93-gef6c4048e6-fm-20210128.002-gef6c4048 Mime-Version: 1.0 Message-Id: <37a2d6c2-9a56-429e-addc-3e52dd49abc9@www.fastmail.com> In-Reply-To: <20210209093224.7085-5-zhangqing@loongson.cn> References: <20210209093224.7085-1-zhangqing@loongson.cn> <20210209093224.7085-5-zhangqing@loongson.cn> Date: Wed, 10 Feb 2021 19:18:25 +0800 From: "Jiaxun Yang" To: "Qing Zhang" , "Rob Herring" , "Thomas Bogendoerfer" , "Thomas Gleixner" , "Marc Zyngier" , "Huacai Chen" Cc: devicetree@vger.kernel.org, "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, "Xingxing Su" Subject: Re: [PATCH 4/6] MIPS: Loongson64: Add 2K1000 early_printk_port Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 9, 2021, at 5:32 PM, Qing Zhang wrote: > Distinguish between 3A series CPU and 2K1000 CPU UART0. > > Signed-off-by: Jiaxun Yang > Signed-off-by: Qing Zhang > Signed-off-by: Xingxing Su Personally I don't like this kind of quirk. Probably we should use earlycon as Arm later. - Jiaxun > --- > arch/mips/loongson64/init.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/loongson64/init.c b/arch/mips/loongson64/init.c > index 8bef1ebab72d..a8ad02d8d088 100644 > --- a/arch/mips/loongson64/init.c > +++ b/arch/mips/loongson64/init.c > @@ -120,7 +120,10 @@ void __init prom_init(void) > #endif > > /* Hardcode to CPU UART 0 */ > - setup_8250_early_printk_port(TO_UNCAC(LOONGSON_REG_BASE + 0x1e0), 0, 1024); > + if ((read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64R) > + setup_8250_early_printk_port(TO_UNCAC(LOONGSON_REG_BASE), 0, 1024); > + else > + setup_8250_early_printk_port(TO_UNCAC(LOONGSON_REG_BASE + 0x1e0), 0, 1024); > > register_smp_ops(&loongson3_smp_ops); > board_nmi_handler_setup = mips_nmi_setup; > -- > 2.20.1 > > -- - Jiaxun