Message ID | 777dc4f87d27e9db383ef04bd21b8aebbb2b2015.1524473714.git.michal.simek@xilinx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB3B560225 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 23 Apr 2018 08:55:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB7CD2885B for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 23 Apr 2018 08:55:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A04FE289F4; Mon, 23 Apr 2018 08:55:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 230E92885B for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 23 Apr 2018 08:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=dM5sFv4lJJWliXO72IClZBtFlP+EEiagEt1Y0EKwqWQ=; b=DB0 sSxnRqg4nnMiImMYyQo5jSiQN7O2Aw6HRNKeC2U6esHnDjETQd9f1KqBBjSVwdPC/15CJghkss8kW cjcAX6mdrtV2frMaYnsK0XlH2590CIm/s6xnD0C0Tc7Tg+jbh3I7JMjodFPuz566GGyx3VeIHdx4W SvoHdyd7zepbBR0uFl/XoPvMcnDCoZC9hEviKbmN/PKuGFNLvIDRWL0Vw2wA7NaqYLgC6LEgjTEvR JpiFlMSHh++h0XkZcbI7Qi1KH4gq3pCDTW1n3/N17kZiGZSIAWeLuVDQnXQ8EPErAdr4lSKrcosUB CodRlZFhPbSwfZHD3YxADJX3XphqvOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAXG9-0001B1-Ol; Mon, 23 Apr 2018 08:55:41 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAXG5-0000xs-ER for linux-arm-kernel@lists.infradead.org; Mon, 23 Apr 2018 08:55:38 +0000 Received: by mail-wr0-x244.google.com with SMTP id s18-v6so38909122wrg.9 for <linux-arm-kernel@lists.infradead.org>; Mon, 23 Apr 2018 01:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=xZ0b5FVCyMqcI4Mw4joMFnzgROm3JNg/vFTuZqRhWco=; b=JaQawK2NwysQUn6Mx2bnLvXh8GR8eQFVY4oFkkY3H39npENTD5rYhgQcielUepyYfP Tk6/nstMe67gTMf1U002jAeZA5bBSL24KK3M9CaTuNf9/wYv2dKAmVSC9U6aLJH98p6j 49ZjE1198CmuSEe0t8ZUimB14VbmMh8CtOfiXL/G8MUgqCDudyGpqwsx58DYVmbZAn3C 82FZHdftHvty7194vDSxY97CRmjEi93xKdbhlYDWfi2XaIiU7f5yxUaicXj7PX21BOh1 oNBU6umYe7uTLI3Em1V1hNG/Ih1Jn0WzelwmtvY7k6Go0LpBsZoskfuztabVv1EV92Lc WI4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=xZ0b5FVCyMqcI4Mw4joMFnzgROm3JNg/vFTuZqRhWco=; b=YwM2Fh9KX34ako2kBDIYqXtvQ3ldyhgMJZSY9YZPWojXCCnv56Dum40t+E4Q0X0+QJ H4+wxNymSZz564viOaJ98h7MQZJ3iuz5krcgVlE0RPpXeCnV3zVvHG5lu41i5wQ3hO98 eoA6s3N49g9vDSbZNAlJZM96OXxiGUkBjwWuWn3yQv2/rJxSJlkcJF5JU9j+0+rvcNUH 1cfredm6/j0hKZ2nVF+LtxBBvBqyL3XIA/XGfXZKic/C/WWgq1m7BchgCjpvw8OVJYW5 XiFyp+p+66dDDYAb5lk6GvB1ebv0JshsaGum0w85s66uz/7v97NEUpsNillFKLqc5tjr Cjvg== X-Gm-Message-State: ALQs6tAsbbsTe/neBzV54Z3TBL20547zpkdn1gLfGz+7PEZVy1xDXFye vNoudqR0kGwXMFU1EG2pdI82CQ== X-Google-Smtp-Source: AIpwx49Dmayl2Dzv4J1Eoj96XxF9BvgzQj48+8wY/Ntf4op/9hEg3B/PQ3SH+GhbO+ds+AWNDgud3w== X-Received: by 2002:adf:c6c7:: with SMTP id c7-v6mr15785460wrh.104.1524473726051; Mon, 23 Apr 2018 01:55:26 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id u86sm7603832wma.20.2018.04.23.01.55.25 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 23 Apr 2018 01:55:25 -0700 (PDT) From: Michal Simek <michal.simek@xilinx.com> To: linux-kernel@vger.kernel.org, monstr@monstr.eu Subject: [RESEND PATCH] tty: serial: xuartps: Setup early console when uartclk is also passed Date: Mon, 23 Apr 2018 10:55:21 +0200 Message-Id: <777dc4f87d27e9db383ef04bd21b8aebbb2b2015.1524473714.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180423_015537_521601_3CBE74E2 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Jiri Slaby <jslaby@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 19d370779767..0fc9de20843c 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1142,7 +1142,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;
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 <michal.simek@xilinx.com> --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)