From patchwork Tue Nov 19 05:18:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 179703 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp170565ilf; Mon, 18 Nov 2019 21:51:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyoUR9EL/t7miWfcTaBFlBN63CV0dIEPiTSJeewSSTl/wMyCmyCAfcHMfBuo4vsUYzKLEXH X-Received: by 2002:a17:906:3458:: with SMTP id d24mr33092393ejb.271.1574142716603; Mon, 18 Nov 2019 21:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574142716; cv=none; d=google.com; s=arc-20160816; b=KpG/sEYJ1Tlu+77RCZ1XZl8PflnLUIEUY42z19OrEt1avLGMWZfI4veSZlcThWKbxp i/ACav12Ym15blepD6SIS9dwBstVdxBQ/FSdVTkrkxR29ikP/zSaS/dwJ7xugGGY7pjx UvBdjCtQsOIlSwi6KUbR89B7VSYUBfv5Pjt+Uq2Pn0IZLNMHa+EiNU8fMWDNP6Yi7f4P CV53UokME00n0sikTD8+NcRLR31uyknklhGSbffhegVc0p5mcYD++VBFuZig9/E8CKOT PKlg8ORkByf1sASp8mxbkisngQ82enJuJ3/1blhEsqjDyWBqkylCRPZ48egBd97GSjcz 9wyQ== 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=PMnyfYzWxavqUaXMI55HgiVn0aAX76G4VtrJc1JaOAQ=; b=SEoNmvX03C+VYIyzO7VtvzZpkuQEIT31jYvrzDQ92dVjs3z1vNhPFL9eFht90Q1Wju ym7L2E8hl/7/HNpnmQeL6Aqob/WiaywtPM3sIPNquHfMBei/giqQlasTdssFQX0PPKMv nIKMzS4nE4U/Ot2TOEckLjp4qiMLCh71dwN1kMW5yA62kjfY8bRsseaVnkMhmCxtoBWm s+4WNXjNjS9Up7Uff7poaiVE0pj8zy30aln0D/viB67UAQ7xnr8vyVZIaIHXVjpF/Pyc ynrHVS/YFBqZeqh5yHQbTwqKdbriTh+Z54WixR7JCqVppKEXeR5IoWHIfpc/PQeb/6FO wi2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zAfVgNF8; 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 w25si14228158edl.418.2019.11.18.21.51.56; Mon, 18 Nov 2019 21:51:56 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=zAfVgNF8; 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 S1731856AbfKSFvz (ORCPT + 26 others); Tue, 19 Nov 2019 00:51:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:49434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731438AbfKSFvw (ORCPT ); Tue, 19 Nov 2019 00:51:52 -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 D6E9C214D9; Tue, 19 Nov 2019 05:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142711; bh=srycieWXSGszwVJ8ASQMK8t1Lxk8Er2ie0ADMyYiDBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zAfVgNF8HM2Wp0mPxugTYcJwrxLw6NR4whZ2q09z4BiOw4oaz3LyvJy0WeRTj996N IEQSL5K28PYu3moN8jot+yuMni1AgNLAvYmE9MmYqDpvWoFU15AzMlxyRY/ifAeMhC zoDDZ8rhPHweKTcMK0Ye/rwgl4EmtvcWk7iFc3hI= 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.14 133/239] serial: samsung: Enable baud clock for UART reset procedure in resume Date: Tue, 19 Nov 2019 06:18:53 +0100 Message-Id: <20191119051330.835278270@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051255.850204959@linuxfoundation.org> References: <20191119051255.850204959@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 f4b8e4e17a868..808373d4e37a6 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1922,7 +1922,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); @@ -1945,7 +1949,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); } }