Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1317358ybt; Thu, 25 Jun 2020 03:11:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrJJmidikF7e5M1cItVLjnRux+55J6BLMT4SGsi+KYcExU4n94YbAZVYiMFnczSBhDcQMR X-Received: by 2002:a50:d501:: with SMTP id u1mr8447216edi.159.1593079908582; Thu, 25 Jun 2020 03:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593079908; cv=none; d=google.com; s=arc-20160816; b=pqfrDHB+y9+gxBtFP55zQ7y1V8CFmb2RkVVQhpDV8bkkrWiJWdN0Fkvn8XM+8QzDU3 O0Y9Xds1sbp+8h/InMoyhtb3xwtD17vs1cfw3/BAv47abwTngVIlsKJVls215N6/j6gk uJPiAweXTe8eEjfYS0JLQ2ZbI4aF/YJAoeDPNVqZ2fjEzUslGq5J3qrwUVS74MvXgEU+ THqWgiOVv2Y+n7/H9VVKN/AY5cRb1c2UTnd3+J8RKH0nZerqRoUJCJpFN+eHeB4/b/yq GZUSpcwPwPYdGJgQpvdsu160KSn77Mah+zuqUwwgk30MtSD4enCXWagwddqZoVgQ/yld asfA== 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:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uYAbTedBLrPgbyu8aGDGQeWMTEGBRLnGuRsBNZEpklc=; b=hIL3+BKkqDDO+dxt6h0wka3+FLa7pOATfi5J62JDzH07TyUmvBYsZzGn0mgcUsnXki 5gJT4amv8bSXtC/+B2JN7ViY7DB0AK6S1E+sSWiBQbEf4heDvC10xwv0RkAi14jr9tLO aPcZus/VdDgp7Ta4LGFsIURF6xFG53vPmuiJHEaBdkm7MRzB3XUcabN4kASrfdazvy4p VjXdH+hOVn+aY3m6cWEZ05bvJEBZa3K9otXGCoZhuwH3l8f9SorIOLijv4kLaRO9cAY8 DY4AjwFjYnoh/5Qu1TMbDoL5KNHleCV3J6WlhbgIDp3YAtTQLo2dvRgl/9rQi+ldoVey jRpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CrZR2mRI; 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 p91si6216003edb.129.2020.06.25.03.11.25; Thu, 25 Jun 2020 03:11:48 -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=pass header.i=@kernel.org header.s=default header.b=CrZR2mRI; 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 S2403795AbgFYKEP (ORCPT + 99 others); Thu, 25 Jun 2020 06:04:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:40284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390025AbgFYKEO (ORCPT ); Thu, 25 Jun 2020 06:04:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8776120702; Thu, 25 Jun 2020 10:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593079454; bh=N3g7Ksra9IIJA7B8GTRquVYJxy1/dbhL3PGmoep0y/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CrZR2mRISPRewDUMVwxnOooX/hzIpIxSEgyV06dDSG/kbZ86itIUhYqVB2A2tJpjZ j9nRSw3OCuJE9hRB3te+yNys3hPTXstwxypdvAV/thYYTMZHyFLnQI1PWlLpyak98X lRRqpGpmg+rRdmjzqYR5WPFD3+QpKlNOEA6uW6X4= Date: Thu, 25 Jun 2020 12:04:10 +0200 From: Greg KH To: Vabhav Sharma Cc: jslaby@suse.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, v.sethi@nxp.com, Vabhav Sharma Subject: Re: [PATCH] tty: serial: fsl_lpuart: minimum baud rate support Message-ID: <20200625100410.GA3327034@kroah.com> References: <1593078545-11272-1-git-send-email-vabhav.sharma@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1593078545-11272-1-git-send-email-vabhav.sharma@oss.nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 25, 2020 at 03:19:05PM +0530, Vabhav Sharma wrote: > From: Vabhav Sharma > > The formula for the baud rate is > baud rate = "baud clock / ((OSR+1) ? SBR) > > Algorithm used in function lpuart32_serial_setbrg() only changes > the SBR. Even with maxmum value put in, OSR stays at 0x7 and the > lowest baud rate would be ~ 2600 bps > > Update the algorithm to allow driver operation at 1200,2400 or > 600 bps > > Signed-off-by: Vabhav Sharma > --- > drivers/tty/serial/fsl_lpuart.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c > index 90298c4..0fd0fa5f 100644 > --- a/drivers/tty/serial/fsl_lpuart.c > +++ b/drivers/tty/serial/fsl_lpuart.c > @@ -1925,6 +1925,10 @@ static void __lpuart32_serial_setbrg(struct uart_port *port, > tmp_sbr++; > } > > + if (tmp_sbr > UARTBAUD_SBR_MASK) { > + continue; > + } Always use scripts/checkpatch.pl on your patches so you do not get grumpy emails from maintainers telling you to use scripts/checkpatch.pl on your patches...