Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4831815ybl; Wed, 22 Jan 2020 05:33:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzCmQ/H0bUvHMML4kAofcPoU0rseLQGJ3H3czoEqCZnwyVplC55i+V0wJqxlMRdeTd9oaKL X-Received: by 2002:aca:b808:: with SMTP id i8mr6566907oif.66.1579700014170; Wed, 22 Jan 2020 05:33:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579700014; cv=none; d=google.com; s=arc-20160816; b=fuz6shMXlzZAuxXCxGlwN9NNo0+8BAFrOUfKT9oV9d6pZz/kQw0mgnqeyA4JIN5sZR DLWXTSeYGGanyd3DZbhCOAL/vs/wJ7KOJxrAJMJDXPjbhxYQ2XSRMEbpUtBvJYDnrYhZ td5jGenkbZjZ+kbiMULjRwwanij6NSAPSJYC7zOfUSwboN5SqJxiGDJVQzjpQBorJJ0n gSVpTHC9QZzXwmFV5pm7Xyj8qil32CeDDZbGYrC6vbXk3b8oNEYM7/V4YZmnNstaEuHP b6imZMyrCoObxqn7WPlkLcC0gaH2MNqhjxgK0dXluRo2Xq+a0F2GPxToQK08rf27aits sl4Q== 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=v2sirzFyS+bJe6UP+wvgwiohAz6zbOgxRFqHP+kBnz4=; b=zSNTWGFX1mIpOrU5rTyUbRRkONZWbjkb3P0paEOeoUuOBq6HERi0P9uq1pnQfOgwnJ +AgUmzv5dcaYGOfDyRM6JI5X/WyBGhVj7/za0Ha/P9W8ZClRGpYvRsCASHTufvwmwAcR n4jdMB8oouIaKR+a0759WfvUS4zpE3FXLDmW5exrSPtB3UbjQIFYIKaFP+zqeRXuq+MR uUDLGcdk0OlQ730rSqfpYzTrsxYf95Of7aGZ2FwzNImFsLLauA1kE3KllygR63asYhi5 z2g7zzDdXNBmTN7SwTFGsk++B6E3DKFoaPOjje74Ljso2+IdMJEpkf/pQdJmrBu4Zdb6 5IWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l9fui+BQ; 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 w29si27206920oth.313.2020.01.22.05.33.20; Wed, 22 Jan 2020 05:33:34 -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=l9fui+BQ; 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 S1728900AbgAVNbd (ORCPT + 99 others); Wed, 22 Jan 2020 08:31:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:35268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728904AbgAVNTW (ORCPT ); Wed, 22 Jan 2020 08:19:22 -0500 Received: from localhost (unknown [84.241.205.26]) (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 178742467E; Wed, 22 Jan 2020 13:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699161; bh=LByY10wpkdMhOfDenUl7OS5TBtH4DUSUXN3WLEC0Sig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l9fui+BQRA9lMuBRBZnpCPtFDSytpEIq5Xm1p+Sgs1ihrufDdX9SzoFffzr5Ki2Uh LTmBXcoVWNBa+eZOZUVIgKOEL02MHcIkTuXWSg0vWgeIpGRgX2QFgxQiG/Id7s9k1C OAsubqotzWuDDYaaPGaC3DHq7ggNUpUMUHh6D9Co= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Esben Haabendal , Han Xu , Miquel Raynal Subject: [PATCH 5.4 059/222] mtd: rawnand: gpmi: Restore nfc timing setup after suspend/resume Date: Wed, 22 Jan 2020 10:27:25 +0100 Message-Id: <20200122092837.940724471@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Esben Haabendal commit d70486668cdf51b14a50425ab45fc18677a167b2 upstream. As we reset the GPMI block at resume, the timing parameters setup by a previous exec_op is lost. Rewriting GPMI timing registers on first exec_op after resume fixes the problem. Fixes: ef347c0cfd61 ("mtd: rawnand: gpmi: Implement exec_op") Cc: stable@vger.kernel.org Signed-off-by: Esben Haabendal Acked-by: Han Xu Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c @@ -2727,6 +2727,10 @@ static int gpmi_pm_resume(struct device return ret; } + /* Set flag to get timing setup restored for next exec_op */ + if (this->hw.clk_rate) + this->hw.must_apply_timings = true; + /* re-init the BCH registers */ ret = bch_set_geometry(this); if (ret) {