Received: by 10.192.165.148 with SMTP id m20csp3180926imm; Mon, 23 Apr 2018 01:55:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx488AHgkmUJZrdl4NLGcxx4bLHzx/ZJl/QNssl5v5RNbFcjibZRmNAJqJz7+98xHHXDmcPUY X-Received: by 2002:a17:902:6bc3:: with SMTP id m3-v6mr19617428plt.363.1524473732073; Mon, 23 Apr 2018 01:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524473732; cv=none; d=google.com; s=arc-20160816; b=dY9no3gyndxyTw44wsmJA15n9G5WCZm7LsKk6xg2D8OqRjsAWNAG9QDi4nl5pybVjD vmPxaGrBk+qczh5NTuFTrcghFTFjL8ImnTfUungw2dvNmtv7GWe436uHjmqMC7T7tJmn g/esv2kAsruYuNCxKBX/X0qt+VyYGTH+/h0XQoknyaw4xBoIfWvCpiT18nItBKoA+GOC bhcpySOekyjlV77M+ggzIHAwAeHIvrvUi7EaitMSArI0MyAvWKt3UwYVGFThr1CZdFHZ 4qSJAVYW6f8huL78gxtOt4s7Gp0jRBurBynjM5hnYxQlxsZdxRtMeTlj4dJ0Axz3ti2v Km3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:reply-to :dkim-signature:arc-authentication-results; bh=PZHkkSLprGewGMX+ZoNVDUuRrkALLH5w18LHxieJD3U=; b=az/RqVhyEA6kcZx6kgcXbx1GDQJQT0WR+AuVgE3SDBuResvui8fiQ3p+SuuOmrXhXw UvcN5qqCFIM6hgkdBKN6yLPfGaHBpf5Yiyd39J4gu+hMKGg28b4Gc00023LvnyXjJ2TL uvU2nxdhfzV9VKr5tZ2fUrGObnKRPiZk05UfPLlyvXcmC4/U9fZjnBW1Ix/dcxk8H61G A6HN5uFmGHOgCZgPJJswNXcSYu7/J5CZZRNm40o3A4cnalew/GBfIkdwKYCck3U7K4DF lVK+Rn4P/sICzn65vTMDpduYA5g5NGKJfieg34pcbCv/Eo1LcDM5qWtMgDUVr/qmSr24 HV7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=mI/XuyHY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si10455659pfi.117.2018.04.23.01.55.18; Mon, 23 Apr 2018 01:55:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=mI/XuyHY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754602AbeDWIwu (ORCPT + 99 others); Mon, 23 Apr 2018 04:52:50 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33127 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754512AbeDWIwk (ORCPT ); Mon, 23 Apr 2018 04:52:40 -0400 Received: by mail-wr0-f193.google.com with SMTP id z73-v6so38923781wrb.0 for ; Mon, 23 Apr 2018 01:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=reply-to:subject:to:cc:references:from:openpgp:message-id:date :user-agent:mime-version:in-reply-to; bh=PZHkkSLprGewGMX+ZoNVDUuRrkALLH5w18LHxieJD3U=; b=mI/XuyHYFttdgQHkOD6SdrJper/88Y3G62kE204iRZjt81BJYDVkwLqaPAiuNTtHso 3PSJlu877bCAqjSjyQX2wjL0WkHG0g/BKXPO2rJ14Ip7ig3aZ1hGN+0hxo5kmA1/nhBd seeuLnf/h4yphb9VTxMEgUdmejYS3EoIPlLPPs0eDGG4jdHSKxN6/25RSYKo10ogdBRY CAKZPxWMZs0IJnWa3gFiUDJsBrb6ZJR2+SHuAqp2b/56MnuGe/fKgvX1opcQ2KnTt4Vc 718a+DxwNFBYWayTky8h/vXbgsIryXIxO/aYHVSHGaBNwLXGOLEOQgaP1i1g7ivfAZL+ 3TKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from:openpgp :message-id:date:user-agent:mime-version:in-reply-to; bh=PZHkkSLprGewGMX+ZoNVDUuRrkALLH5w18LHxieJD3U=; b=cbPSiQjRueROrJ4t/i5ELjYDYM8aPG97MAxDb1WYDiEopYsnF1nOdcIG/tJIA+M4gS 3pCK+lGzQCCn9wr1S2SJ4O8aD5MiPVE9Al6hkMJK3jZBlgNakQseksnH7XPCE4GVHiJ6 h+SZf9GS924gtjUtrkLz3tMSHia1W4idVyTku0krScm81LODPDvbSGQWyVe+1pivdcDN zzHog2Grxbzczx7a1a2zxWKC1o2+DS2rnun0+zFydbIxAnHRvVoUZZfAtgfXc2tKxyQY 6WcCVDI0LEm5B74tyEctfjh99dSeghMD3UGBAZs1Rfs+2Imbr4OODQnrUvytSxl1WsIT FH4w== X-Gm-Message-State: ALQs6tAB+RL5Zja9tO9XtSBsQxh9MdBVQZCjDV9EpAP62zqY0e3fycr/ QwXPBWuGSU+JddU2I20lxjIQ/w== X-Received: by 10.28.152.143 with SMTP id a137mr9678033wme.137.1524473558997; Mon, 23 Apr 2018 01:52:38 -0700 (PDT) Received: from [64.233.167.108] ([149.199.62.254]) by smtp.gmail.com with ESMTPSA id k30-v6sm30960972wrf.1.2018.04.23.01.52.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 01:52:38 -0700 (PDT) Reply-To: monstr@monstr.eu Subject: Re: [PATCH] tty: serial: xuartps: Setup early console when uartclk is also passed To: Greg Kroah-Hartman Cc: Michal Simek , linux-kernel@vger.kernel.org, Jiri Slaby , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <2ef5ac478f8d32bc807ead758eb5d60744a44515.1523367208.git.michal.simek@xilinx.com> <20180423080641.GA20149@kroah.com> <20180423084810.GA11893@kroah.com> From: Michal Simek Openpgp: preference=signencrypt Message-ID: <85a4b544-cd1f-13c2-099b-b1d9835c0246@monstr.eu> Date: Mon, 23 Apr 2018 10:52:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180423084810.GA11893@kroah.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FTBZbx79TwlcJCvh6ZjxZVkaJlMtQt9sK" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FTBZbx79TwlcJCvh6ZjxZVkaJlMtQt9sK Content-Type: multipart/mixed; boundary="eI4X3Kt9fhsTLeOfV5H6TjWJYRaZc25nN"; protected-headers="v1" From: Michal Simek Reply-To: monstr@monstr.eu To: Greg Kroah-Hartman Cc: Michal Simek , linux-kernel@vger.kernel.org, Jiri Slaby , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-ID: <85a4b544-cd1f-13c2-099b-b1d9835c0246@monstr.eu> Subject: Re: [PATCH] tty: serial: xuartps: Setup early console when uartclk is also passed References: <2ef5ac478f8d32bc807ead758eb5d60744a44515.1523367208.git.michal.simek@xilinx.com> <20180423080641.GA20149@kroah.com> <20180423084810.GA11893@kroah.com> In-Reply-To: <20180423084810.GA11893@kroah.com> --eI4X3Kt9fhsTLeOfV5H6TjWJYRaZc25nN Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 23.4.2018 10:48, Greg Kroah-Hartman wrote: > On Mon, Apr 23, 2018 at 10:37:12AM +0200, Michal Simek wrote: >> On 23.4.2018 10:06, Greg Kroah-Hartman wrote: >>> On Tue, Apr 10, 2018 at 03:33:30PM +0200, Michal Simek wrote: >>>> Baudrate calculation depends on requested baudrate and uart clock. >>>> This patch is checking that uartclk is also passed. >>>> >>>> The same logic is used 8250_early.c/init_port function. >>>> >>>> Signed-off-by: Michal Simek >>>> --- >>>> >>>> drivers/tty/serial/xilinx_uartps.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial= /xilinx_uartps.c >>>> index b9b2bc76bcac..a654cda203c7 100644 >>>> --- a/drivers/tty/serial/xilinx_uartps.c >>>> +++ b/drivers/tty/serial/xilinx_uartps.c >>>> @@ -1181,7 +1181,7 @@ static int __init cdns_early_console_setup(str= uct earlycon_device *device, >>>> /* only set baud if specified on command line - otherwise >>>> * assume it has been initialized by a boot loader. >>>> */ >>>> - if (device->baud) { >>>> + if (port->uartclk && device->baud) { >>>> u32 cd =3D 0, bdiv =3D 0; >>>> u32 mr; >>>> int div8; >>>> --=20 >>>> 1.9.1 >>> >>> This patch conflicts with the previous patch you sent: Subject: [PATC= H] >>> serial: xuartps: Fix the early_console junk character issue >>> >>> So, which one should I apply? >>> >>> I've dropped both from my review queue now, please resend the one(s) = you >>> want applied, in a patch series if needed. >> >> First of all thanks for dropping. I forget that I have sent it in past= =2E >> >> Both patches are targeting the same problem. The first one is more >> destructive. >> >> And this one is what 8250 is doing. >> >> I have also sent >> "[PATCH] earlycon: Initialize port->uartclk based on clock-frequency >> property" which is filling uartclk based on DT to do proper divider >> calculation. >> >> It means when patch above is applied we can keep divider calculation i= n >> the driver because it is using right values. If not we need to remove >> that baudrate calculation because it is not correct (uartclk is >> hardcoded to BASE_BAUD * 16 in of_setup_earlycon). >> And it is really a question if "port->uartclk =3D BASE_BAUD * 16" shou= ld >> be in of_setup_earlycon. >=20 > Ok, but what should I do here? My patch queue for serial drivers is no= w > empty, so if you didn't get an automated email saying your patch was > applied, please resend what you think needs to be applied. I got that email and patch was applied. I will send proper version. Thanks, Michal --=20 Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs --eI4X3Kt9fhsTLeOfV5H6TjWJYRaZc25nN-- --FTBZbx79TwlcJCvh6ZjxZVkaJlMtQt9sK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlrdntAACgkQykllyylKDCE5ggCePTp8OIkqXxAB49+/UG5r4DXv q+cAnRTQ8VtZ7iQDts2I85S2s7zgalpk =n2TL -----END PGP SIGNATURE----- --FTBZbx79TwlcJCvh6ZjxZVkaJlMtQt9sK--