From patchwork Fri Jan 18 21:06:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 156046 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3706187jaa; Fri, 18 Jan 2019 13:06:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN5VTDiYUYOFTE3UNFPPuajkRMRmEtsS8w4p+t9WlLY+lGXfPF9c3/1/f2/kY5JVUoEsLcXp X-Received: by 2002:a65:4049:: with SMTP id h9mr18992252pgp.304.1547845593693; Fri, 18 Jan 2019 13:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547845593; cv=none; d=google.com; s=arc-20160816; b=t8oZxKtY/HnUdYbd+6Ss5Tf681LPaSXWK/UQ6EWbBU5Qq2BdHT/mrDAxxO3De23Mqi Rt9CXaxlMd2V4tpkPZar1QA0ESkM6tQxmuP4xj2xq/sqEXhMITrLsiJHTlnn/B795h+F Tjpgaao12ObZYFO7o9fihqkLkwHM3RHCf1ygUzYNtcjTwmMCnO44hoPhjUk52WosLNX/ 8XMOkqAPC2LdWYpXyB1gmW2ULtcFanpVyxKGKTJqN/Vl+zBEjCpMCwiGSgusOwXWL8al ylxjDF/1jxBquzTNsqftMCxLs4mCh8/FgwDhzCVKB+c2zTEHwYX9ga7U7QbQh+OWVeRp ZfPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:dkim-signature; bh=OFsDt9LkKYTfZ5Vr+/tbcNmQXEls0RK6LYL3sqO9ALc=; b=akUtgHqdScsgKyTj/ZTK+AHpqPlFPB95O3yWp9rV/CVe73yDDmQ7976KzwQ8EL25uN EW/LfFWfd/elqzxDT6K24fxIMWIAs/1dv4xaMmTCzGlRBUwzcC1uap8gsyfccy1MPu6Q /8fxToVZFa9skdn16TgYWx/ymGdYVYpl/cv9bbtZVB+6VG6dFiO0wuY7E9rC9OtQREjT BUYis2uAG8zsYB54SGIXxOP6/tfV7ik2BaXKuXFR/IqI+8HDoKWmz0kJypFEK2LnfNxt 0boWiKz+pNcVFlXvEhN7WXjDiiVDM8TyX8ctO0blZaJxkmFqII6UfYDmHqCfb/U0RXlh Y1vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b="eRJ8Ib/M"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Kc/iWEoU"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id h10si1995569pgi.562.2019.01.18.13.06.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 13:06:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b="eRJ8Ib/M"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Kc/iWEoU"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=OFsDt9LkKYTfZ5Vr+/tbcNmQXEls0RK6LYL3sqO9ALc=; b=eRJ8Ib/M/HhcZ2 v3iOQG6NInvAg4MSa5R+ZA98zTHVTKA2dPbFERoeaJVvDtmHWdSBEZ4RhqkX/LgfQudbgnPc8rbjp gof7293yUR98Z9YLAOafaFSQ8lqJko7pGszPVZkn6qGmLjz9wQc8NYVYUWAIpQAep/pvd3E5XBrp6 KR0mc1mDp30eATWUuj/8qwaUuqyJ7CsLwFvY4TeuU1Lti9+0S8ILgciUHHO91iRObUjlU+Se97y9y 8vFjYilhxhhsgkkpNX2dy4ssKgzuxdMbZWc5OiRExRYy9z4K6eyLbPRcfV/4gvgJSRMHHdtJe/w3g b3/CVYL1YuFJcHCWcUUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkbLE-00050b-5B; Fri, 18 Jan 2019 21:06:16 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkbLB-000502-6E for linux-mtd@lists.infradead.org; Fri, 18 Jan 2019 21:06:14 +0000 Received: by mail-lj1-x241.google.com with SMTP id k15-v6so12757476ljc.8 for ; Fri, 18 Jan 2019 13:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7jX5zdy+b8YE7tC69x5iiWFVbJ0EmPYf9FF8/dNUZV0=; b=Kc/iWEoUpCt2hd+UpbSktEIiuf2h8BtfaPSAyfUun0NiwpgcgI5BOw3TPTRiZBke9X Z0NPRLFqZ+uEsKK4Z/dxO8zt8ZG9RRzPukqrD885R/2nSAHVp+/WspnXztdApOP933Tk AIYhxAlu25Ia3FqhhQDn9d6ikOAyYUn9R7akc= 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:mime-version :content-transfer-encoding; bh=7jX5zdy+b8YE7tC69x5iiWFVbJ0EmPYf9FF8/dNUZV0=; b=r6nWLsGKoUXC1tNCJvSNPkLpsnH54FtZj/IJ424/JSIBtOEi1FYYxue+sHrcNdsTs1 e5VMjkvhDc6S/PhKD/tk/kyBXNz1zCpDo2T9LWi3+0Y3NOAFt/SL3ro4nphrJXtDYeeW CBNvFyuCVz8N+F0LpYIW5YCY079t7YNMcqJ8wJPbvKrphupnbxXi42YUb0zD0pQPf3zU Aq/4wPyepyfx9qNyTBmlqLh8sY/HB8A5x1vj9O9ID/oJtWQos1LWpgf+oJZsCGHHSJl3 cjD0kTUgzW5uHvyrL+j10fzmCyd51StAxoXFwcojnV6uiBQAHvhkYVrrMjrLiWJHZSYQ x2jw== X-Gm-Message-State: AJcUukdcu3XmNGgs6rcF/xzEtH628a+9EPMNCo3JI1NpBl2zA+GrXwdb IxhQom68Vjgr9zIKYmXCxXZHEw== X-Received: by 2002:a2e:4218:: with SMTP id p24-v6mr12982091lja.58.1547845570980; Fri, 18 Jan 2019 13:06:10 -0800 (PST) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id k68-v6sm923993ljb.35.2019.01.18.13.06.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 13:06:09 -0800 (PST) From: Linus Walleij To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org Subject: [PATCH 1/2] mtd: rawnand: fsmc: Reset NAND timings on resume() Date: Fri, 18 Jan 2019 22:06:04 +0100 Message-Id: <20190118210604.8231-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190118_130613_238208_1E37E4E7 X-CRM114-Status: GOOD ( 13.92 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org When we go through a suspend/resume cycle the NAND timings may have been lost so reset the chip. This hardware will autonomously enable/disable the chip selects depending on what memory is accessed and chip selects are not software controlled, so we only lass chip select "0" for "all chips". Signed-off-by: Linus Walleij --- drivers/mtd/nand/raw/fsmc_nand.c | 1 + 1 file changed, 1 insertion(+) -- 2.19.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c index c9149a37f8f0..4050843dd35e 100644 --- a/drivers/mtd/nand/raw/fsmc_nand.c +++ b/drivers/mtd/nand/raw/fsmc_nand.c @@ -1164,6 +1164,7 @@ static int fsmc_nand_resume(struct device *dev) clk_prepare_enable(host->clk); if (host->dev_timings) fsmc_nand_setup(host, host->dev_timings); + nand_reset(&host->nand, 0); } return 0;