From patchwork Tue Nov 19 05:17:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 179652 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp156142ilf; Mon, 18 Nov 2019 21:34:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwFHgIUuLzp+IGxgp9jMmf4mcO0BydxoALcC8mTTYYWDg2kAr5aCAZKfLa0jPzvTdqc0kPM X-Received: by 2002:a17:906:6c95:: with SMTP id s21mr33072263ejr.205.1574141687181; Mon, 18 Nov 2019 21:34:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574141687; cv=none; d=google.com; s=arc-20160816; b=AU0NJ/hjtwQ9nA/dIe1OwiAiVDeN9Jnj7XAzfSnC51R3D8qWsyVK3LcngaKCtXEKkt IquJERgiuay+2lEOfeWlHPeLl3d8RNrvax080K5wbyKWJuQjQ1DR+hx9uuvWKY+2awl0 JJlvNC7lEi4NGdusSNiUQRDjd/GW/V/vGKGzKqzYmx3eRdBhgiGWujG51GGpy0a7who7 tRH33sVk0NFO/TYy2DtvO+Mp47P3H1evOCD6SLDQsw1daeMHkh5ct+37gJF/PwQtF0QL uYmjXawXI4sCg8gzLwcsTDj3b6UeAAL8aP5P1YFzPlbRbohJ03BxVpBTz0zhpcSFYakW vjNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nqNYNzpPvoz2RJ++p5tmlq3m5cXtLZxNIkOBZwSM6W8=; b=eD5Qm0pSK5FZFOvoxSCje9+6LYkr1AvKjnuDJ7nD1lnBaJi963Y/ImdL0eeLqnJ9II cs8D+S2amFzPRuQo6tQgSEGZCY+K0FneJychhs70vhNJcCSkMUYzQTxHSCvDIFKNS02n 8FKFRaac+iAx/bv+5TcHfI6x68Umf07aY/s0XafhMoBPjSwIyw9/ar5t1u+WGpqgtP2O +3Kv2xdWmYyQhrPuHuQC5F9n7HtnH3QSd0vu3puMf1ydR8wDCsn88V1bt239Bhv9PETE 88IHSClNV6NBrFwCZr7fXUhbpMQqLSZ2TmS6i29waAgVw5Akc8DlXuDsJS4o/r4dXASO Zhig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0PoXAs+6; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 b26si12093324edc.25.2019.11.18.21.34.46; Mon, 18 Nov 2019 21:34:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=@kernel.org header.s=default header.b=0PoXAs+6; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729246AbfKSFeo (ORCPT + 15 others); Tue, 19 Nov 2019 00:34:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:55508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729722AbfKSFeo (ORCPT ); Tue, 19 Nov 2019 00:34:44 -0500 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 D7A7C214DE; Tue, 19 Nov 2019 05:34:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141683; bh=oO0gUUG/vj63i5VoHzt41VVsBO2NgniuaSJlilhfdaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0PoXAs+6jyDCwAkO9+zggvdR25rvOyiABy0FSGdeJiBNYE9LwZcM1iaQ7+BvTjwbc XaOrOqffcxPhgUaSpEnICNCyyG2FznQEHOAvUsoKzYRn9P1JZ/kvIrwU4FuOeI4v6Y AFAZ7IdXRuiwvB0rHH0Lz5z0O5vurvjG7JFUVeTA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 4.19 245/422] serial: samsung: Enable baud clock for UART reset procedure in resume Date: Tue, 19 Nov 2019 06:17:22 +0100 Message-Id: <20191119051414.877369929@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051400.261610025@linuxfoundation.org> References: <20191119051400.261610025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Szyprowski [ Upstream commit 1ff3652bc7111df26b5807037f624be294cf69d5 ] Ensure that the baud clock is also enabled for UART register writes in driver resume. On Exynos5433 SoC this is needed to avoid external abort issue. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/samsung.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.20.1 diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index c6058b52d5d59..2a49b6d876b87 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1944,7 +1944,11 @@ static int s3c24xx_serial_resume(struct device *dev) if (port) { clk_prepare_enable(ourport->clk); + if (!IS_ERR(ourport->baudclk)) + clk_prepare_enable(ourport->baudclk); s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port)); + if (!IS_ERR(ourport->baudclk)) + clk_disable_unprepare(ourport->baudclk); clk_disable_unprepare(ourport->clk); uart_resume_port(&s3c24xx_uart_drv, port); @@ -1967,7 +1971,11 @@ static int s3c24xx_serial_resume_noirq(struct device *dev) if (rx_enabled(port)) uintm &= ~S3C64XX_UINTM_RXD_MSK; clk_prepare_enable(ourport->clk); + if (!IS_ERR(ourport->baudclk)) + clk_prepare_enable(ourport->baudclk); wr_regl(port, S3C64XX_UINTM, uintm); + if (!IS_ERR(ourport->baudclk)) + clk_disable_unprepare(ourport->baudclk); clk_disable_unprepare(ourport->clk); } }