Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1143186imm; Wed, 1 Aug 2018 10:54:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdlaH2ze8OlBSIwP1JpA3DpClpnI3STNXK8plVht0KZINjVDGXfFMRe6E5gubjyrHWaZKni X-Received: by 2002:a65:6104:: with SMTP id z4-v6mr25454285pgu.361.1533146072013; Wed, 01 Aug 2018 10:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533146071; cv=none; d=google.com; s=arc-20160816; b=tkphHLoADT1Kk+R8wiK+ITyoNiR0qOJ/P3bqeIXVdselbQ5TQppG3m/cJNkEK3jF52 TDhAmGQvZQFCu804p9ieF6DDPs6mwQrxT4HYd68dD17EpYjdZXyLjLXTWXPE0593dAZ0 jFAXs0T7cus6qrage7KvCymxuBSeL+SPjQVlUtwL2H6in5he83OLVUVp+aS/qvCja62F 0e9FNtVy6uMC5UtytlCykAUTcgQAdVDXPL2FQP69Op41knWwiIeIOnNzIc/Oba7LJx// IC14idEFHE4eQvW+aC7rXeKOxiABwXO/5XvFNkvdJvxlYiUcZVwOE7j4giYxNVvoZN/5 qjEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=bjNwNOBTyeFusICAW8RnLJx4LAmyPp/VpJOT2gNgSwE=; b=fNPPGP+eXiVcPAShdkfDHGzzubAnxEk58RAO7I53l+UHSdwXje9TA3cJ8dJODMIZ/w P8h0GJViB7IuW/GRubAWoBJsRrNN7G2e02VHsEckruMffTzvEl/pWYxCBp1B5Ofkcprd hOOxNmwXobUgmTdTUh+O9KitWPmUuPNV8UtDW49cY22gsirz63WSnLAzbTv8odvXuyS0 6cmIT3QwQK1eK0tis77aA9l9yfa7UzQXCC4WcxUD4lNsGLEFd0XpGqEoqujG9X3XdX3U dnOVs99ScKb2TyZiJ+TnTY3H5frDrsI0Iux2BfQwwruVPsAr7lOxi+/M+UGgTry2CyFb uq7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 r7-v6si15593501pgn.491.2018.08.01.10.54.17; Wed, 01 Aug 2018 10:54:31 -0700 (PDT) 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; 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 S2404987AbeHATkU (ORCPT + 99 others); Wed, 1 Aug 2018 15:40:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50080 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405998AbeHATIl (ORCPT ); Wed, 1 Aug 2018 15:08:41 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4FB141343; Wed, 1 Aug 2018 17:12:36 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski , Mark Brown , Sudip Mukherjee Subject: [PATCH 4.14 007/246] spi: spi-s3c64xx: Fix system resume support Date: Wed, 1 Aug 2018 18:48:37 +0200 Message-Id: <20180801165012.049706732@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marek Szyprowski commit e935dba111621bd6a0c5d48e6511a4d9885103b4 upstream. Since Linux v4.10 release (commit 1d9174fbc55e "PM / Runtime: Defer resuming of the device in pm_runtime_force_resume()"), pm_runtime_force_resume() function doesn't runtime resume device if it was not runtime active before system suspend. Thus, driver should not do any register access after pm_runtime_force_resume() without checking the runtime status of the device. To fix this issue, simply move s3c64xx_spi_hwinit() call to s3c64xx_spi_runtime_resume() to ensure that hardware is always properly initialized. This fixes Synchronous external abort issue on system suspend/resume cycle on newer Exynos SoCs. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-s3c64xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1273,8 +1273,6 @@ static int s3c64xx_spi_resume(struct dev if (ret < 0) return ret; - s3c64xx_spi_hwinit(sdd, sdd->port_id); - return spi_master_resume(master); } #endif /* CONFIG_PM_SLEEP */ @@ -1312,6 +1310,8 @@ static int s3c64xx_spi_runtime_resume(st if (ret != 0) goto err_disable_src_clk; + s3c64xx_spi_hwinit(sdd, sdd->port_id); + return 0; err_disable_src_clk: