From patchwork Sun Jan 15 22:32:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9517907 Return-Path: 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 D7849601B7 for ; Sun, 15 Jan 2017 22:33:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A76F328410 for ; Sun, 15 Jan 2017 22:33:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C25B28428; Sun, 15 Jan 2017 22:33:56 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 251C328410 for ; Sun, 15 Jan 2017 22:33:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cStN1-0002Ba-GU; Sun, 15 Jan 2017 22:33:51 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cStMd-0001Xb-Ab; Sun, 15 Jan 2017 22:33:29 +0000 Received: by mail-wm0-x244.google.com with SMTP id r144so26671191wme.0; Sun, 15 Jan 2017 14:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ExuXP6dGZDHs8Q2Up9nglGfkuJI4Xcm+u/3BTvfBPIw=; b=vR8TKtOo4bRdKMAAS/TX3/bBgvt115CVJ+d160Et704ft3RR3aJHs1uY5fRJ3Se4Ad 2t3hlHYOsl4rnFencoBTW1X7XIQEZhu8wqzZzgzjfJ0siQCGgRbHwT0Rf55A97pn6rhs WgC0tHRQY8gMLdbPKWXoJahpwCQgkvIbtCa58pYn/46igcjQnvDJh8Hq5RrLVScW+FiS 2eLJylk/q2hJqpZE72zkP+1zyu2DI8+a7LBUu1J46xE7GYPQoky/b6sa2d1iTW1nGViL 4gLrr7/OZATeU29t5oXbH/n3chQK+MdLIhPdYOGrChrkeKsbmYY9QE3PD/Z8kGm/PO7P TNXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ExuXP6dGZDHs8Q2Up9nglGfkuJI4Xcm+u/3BTvfBPIw=; b=A8tx6xlPtS22xAX8Y4De3Xco/X7duTh3p0OHnIar8XgT6vWcql3S+1ONbvOpNK0ofK ilFW6jrsKrxbCDchrL4P2PYmhpyPARdo5TAcX8NTOqxUQU1G3HukKgOAKIS01pLtHwl1 Da7trtuDKTenib5AwbqRSmA7s1k0ujlb9TvS+5ISyHiyj87eso1DLTeD9+/Y3PGx+iUG tkgRJylhwtDiP8m5cyqxk2sOGb3UQOBqnUx+HqkiOVLdAMp1Sc82nZc5rrBwseOoekKZ kM3YlkYXJw+zZ8HC/xYXDr0tLPXQhNWtToTGUdR8pxVn1N6S4hZOhomzyzxjc+dwriO4 o6/g== X-Gm-Message-State: AIkVDXL8B9ZvGxD4WdtPGgleymQv7Y9sfYbYb3lq9wGxUdJ8iPzsHciq16I44xria2Jrhg== X-Received: by 10.28.127.73 with SMTP id a70mr10356004wmd.76.1484519585742; Sun, 15 Jan 2017 14:33:05 -0800 (PST) Received: from blackbox.darklights.net (p5DE38740.dip0.t-ipconnect.de. [93.227.135.64]) by smtp.googlemail.com with ESMTPSA id a186sm24182515wmh.1.2017.01.15.14.33.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Jan 2017 14:33:04 -0800 (PST) From: Martin Blumenstingl To: linux-serial@vger.kernel.org, linux-amlogic@lists.infradead.org, jslaby@suse.com, gregkh@linuxfoundation.org, khilman@baylibre.com, carlo@caione.org Subject: [PATCH 1/4] tty: serial: meson: allow baud-rates higher than 115200 Date: Sun, 15 Jan 2017 23:32:52 +0100 Message-Id: <20170115223255.10350-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170115223255.10350-1-martin.blumenstingl@googlemail.com> References: <20170115223255.10350-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170115_143327_520202_4367F783 X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Martin Blumenstingl , catalin.marinas@arm.com, will.deacon@arm.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The vendor driver allows setting baud-rates higher than 115200 baud. There is a check in the vendor driver which prevents using more than 115200 baud during startup, however it does not have such a check in .set_termios. Higher baud-rates are often used by the bluetooth modules embedded into the SDIO wifi chips (Amlogic devices use brcmfmac based wifi chips quite often, 2000000 baud seems to be a common value for the UART baud-rate in Amlogic's "libbt"). I have tested this on a Meson GXL device with uart_A (to which the bluetooth module is connected, where initialization times out with 115200 baud) and uart_AO (which I manually set to 2000000 baud and then connected with my USB UART adapter to that). Signed-off-by: Martin Blumenstingl Tested-by: Andreas Färber Acked-by: Kevin Hilman --- drivers/tty/serial/meson_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 6aea0f4a9165..60f16795d16b 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -364,7 +364,7 @@ static void meson_uart_set_termios(struct uart_port *port, writel(val, port->membase + AML_UART_CONTROL); - baud = uart_get_baud_rate(port, termios, old, 9600, 115200); + baud = uart_get_baud_rate(port, termios, old, 9600, 4000000); meson_uart_change_speed(port, baud); port->read_status_mask = AML_UART_TX_FIFO_WERR;