Received: by 10.192.165.148 with SMTP id m20csp3177025imm; Mon, 23 Apr 2018 01:49:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/O5zKAz6O/myfRD5eFlLAR6thOv3EN2lV3iAH+MP94qC7RK88d2NXKNX+JRRS0KmKolVph X-Received: by 10.99.123.20 with SMTP id w20mr16506110pgc.124.1524473396683; Mon, 23 Apr 2018 01:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524473396; cv=none; d=google.com; s=arc-20160816; b=aMCr7Efe+nkw6/xP5VgUNFPX7i/KsSPo2BqLGEH+uKWskfCXxOH79uXTjzqZu0Q+QR oAz2AOYK74tuPSefqSAQFYBdGGC2q1WCFPB10qkBmz3wXS2Ie1hCa45/82shc+nJO/yA JpQuncRkrGLY1KfktjLG2B+8n0o8FXTIZcfK7F3BSWvQtBsA73ev5YpXM0ybYAAwJmPf ASmYPfX0+VEbhtHDZaUi7eBolNkd21Zub60tP4YpXM2bZYH0XUeYk1OxX2aFKyujHmZs gUpH5I0aif1dWX7Y8jILZd+5QCoalgAwqF8TaUHX71CgPR6AeFrFVpuE0uEYaJ+HOmQ3 jIog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=m+qvREbz71NOFHQa6MEWW+ueuvOzWfXOLLW3/rNMgpk=; b=EG7Av/LLz1KAumJLq+V5vXq6zbDg/iYATF7NVB9GWqy6KM9bxqRDSIfodL61iD/90H yAnbO+2sjcwEYdwaBFoBkel/txK2mzjcaBIkHwlp9/n5zwF7eS9Hly7vfINN562qSmWY Sm8nWJgbO+nrqyhw8jkKQVdYl6u0CzaErCl29tT/o3bBFunCFxjgulTc9CvB9knw0PIX jk9olM19ubR1565kNTKdkAJYEtYz5N4QvhAY5R9V8fxBWKNBpDDfzR3e4i1J61S92KB0 u2ese7IYjOC5zJpcGXqVf7SZZKD2o3IdDtAMygNhzWwJdjAlxalWnrvKVbnpVH7sX/I2 G3eQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r9si9074916pgn.244.2018.04.23.01.49.41; Mon, 23 Apr 2018 01:49:56 -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; 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 S1754427AbeDWIsW (ORCPT + 99 others); Mon, 23 Apr 2018 04:48:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55318 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754029AbeDWIsQ (ORCPT ); Mon, 23 Apr 2018 04:48:16 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D4E2AC64; Mon, 23 Apr 2018 08:48:15 +0000 (UTC) Date: Mon, 23 Apr 2018 10:48:10 +0200 From: Greg Kroah-Hartman To: Michal Simek Cc: Michal Simek , linux-kernel@vger.kernel.org, Jiri Slaby , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] tty: serial: xuartps: Setup early console when uartclk is also passed Message-ID: <20180423084810.GA11893@kroah.com> References: <2ef5ac478f8d32bc807ead758eb5d60744a44515.1523367208.git.michal.simek@xilinx.com> <20180423080641.GA20149@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(struct 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 = 0, bdiv = 0; > >> u32 mr; > >> int div8; > >> -- > >> 1.9.1 > > > > This patch conflicts with the previous patch you sent: Subject: [PATCH] > > 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. > > 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 in > 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 = BASE_BAUD * 16" should > be in of_setup_earlycon. Ok, but what should I do here? My patch queue for serial drivers is now empty, so if you didn't get an automated email saying your patch was applied, please resend what you think needs to be applied. thanks, greg k-h