From patchwork Sat Jan 26 13:10:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 156677 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1476899jaa; Sat, 26 Jan 2019 05:11:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN4enJeR1897ys0HWCmOgz5J4qe8DNXw7ZBXej0RwkNAzYeeUnhc0d/e5yOJePuLS9tvZ4nM X-Received: by 2002:a17:902:9897:: with SMTP id s23mr14369919plp.69.1548508278208; Sat, 26 Jan 2019 05:11:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548508278; cv=none; d=google.com; s=arc-20160816; b=EKXIsV7s/4TdelNVoo+BC8afCd+pgu2svbVr3Mp0A/q0Uosb3RkSR1T5HpwvYasCNa VloFPHwwN1+KITQhtl3M81aAGXBL+MSiQCTpiu7E5m5hUt1AKoP76opUC8qKKwv0I1Wv IgfdIKegRwd8TVjwYEQzDqEqS60KEfARax8I+4WonRla49nQ+FeTxnsRkBF7eDvN4bBj lpxgonzt0YajHiish/DzQ6FkKHRC10jl0Eo9uGq6O1J1MGrEuGj8otpHdUryS01TMDq0 eLdKcOMqCqkE5FHuiFrEKzrESNuEKNIq8Y5FMrtmUsxsBGQcbhrE8tsMUBHLJpx0Nr39 yj4A== 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=sY/gO7VWsTCLPzV4qu/BMswgHueJmxHqb+5RfbiOvso=; b=si2hxFsos5ftCJgp4zDxQ1Olnm7vk1XTOMRxgwDdwdnrOAsZIQrGfENfS5mspzpbOC heCHvlFEUAebJdKcHd+2WWANzYgU2Axz2KGvwify9spST/sgzslrYe6wtxct3DN4kPJJ tURq8ujUX6jamo+ElzeqBuo04AVGl8kl7SpeRWMb8Rj71Oxe2ECuS70YMTa+R5ZnqLZA TOUIWPOKStnaDBdDfBjOr2lqbXv2iDzWRoyIJRhxeCRunOIvOG6z5l87U4GjQ9d0zy1X VEpRkw2rBONHSkeAAH/LziW5a5gWnXsqcdqxkmEoTTEPGf1obNAen/wHrr0SGezlYrmG k1yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=F26CAX2r; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="XlxxHOM/"; 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 f17si25827848pgj.208.2019.01.26.05.11.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 Jan 2019 05:11:18 -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=F26CAX2r; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="XlxxHOM/"; 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=sY/gO7VWsTCLPzV4qu/BMswgHueJmxHqb+5RfbiOvso=; b=F26CAX2rS8Kc+R dVVP/yafzBB/1AhbrFlaErFq/C0N6FzGuDGUpD/QYfO5v8FjFUvP4/DRXV77P4igDYz3iIhFZ72YE d1NXJ+NYS4F8ao/RIaEIaxFad4ALNtJVzW7ZJG++b0DdeED+C2rGFwKlOeaSozrQ/DSy9RDe93Z9D 6ugi2NKKlsXx0asM+shLCjDaMAmWEIK5dUbiTCfyPoqC/oxjyvrwY0XqZEhEUiTN5/Fbw4xKKG+nU vUtSKakVH/mrmzdNVzLe9Oy/kfnlORZItJGCtTnNXxHftXL8sT86Ams7q5hUcOLfTW0d664W5oFRv 0o3NizILWlN7CNiO3WHQ==; 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 1gnNjq-0003gW-Tt; Sat, 26 Jan 2019 13:11:10 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gnNjn-0003fb-EZ for linux-mtd@lists.infradead.org; Sat, 26 Jan 2019 13:11:08 +0000 Received: by mail-lj1-x242.google.com with SMTP id s5-v6so10549070ljd.12 for ; Sat, 26 Jan 2019 05:11:06 -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=XA5NLDhV30gS07NuF5vW5+O0eIjY1EdoatKv5HFYMHU=; b=XlxxHOM/Uw9+b06ncf1epzykozPgrLbdk5OCvfojmbbNw+3HlH01soA9hbScmY+XrI 5CZPnye4rz6GEvwcafuYj9O5IUtekfottYvJNDnU5sRCEbcTsB8wSECPVGTUL7NOqTHd sokK2jmELoBeBwyyLQBaBLn9mkH9DcknNIoEo= 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=XA5NLDhV30gS07NuF5vW5+O0eIjY1EdoatKv5HFYMHU=; b=Dc2KTY2zzwlocEbVOi45HC+l+MNpizXppMrDle/TOb5bPDVtqB0ZP/T2JxSpl+rFCr sRuH8kghtpUIUrnTgODygXtEr89wTj2olExOfKgpX0SSV5uZVPqBgKZNFJPtKDB4eXIa +0tuAOEVldV2jMnkWhvuXYNUlI75YUvxU9+zjhKwM0lIsbyA8Aha1iuJQKredO+dYyvH 99r5wGgE9nujefLYwzRwOTYcSjCIqK9w45MRKf7Kc5rBJospbmrC6LQGcEaIWa0wz0tn Y/+kRd5N+hkdOvgSgV9E3D9Q5YIE9ic/uuRE9u+ksypH1FGGuvF4ZE1OrowZDqzktptH 2D9Q== X-Gm-Message-State: AJcUukd5LY2HlC6FiOLDTgsWsQdGpnhr3cwQ2VRK99kJ1bUQqUBgR2Ru ajzNUpsk4HTqIhHYMXpXFSAB6g== X-Received: by 2002:a2e:5cc8:: with SMTP id q191-v6mr11876827ljb.192.1548508265061; Sat, 26 Jan 2019 05:11:05 -0800 (PST) Received: from linux.local (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id s127sm2109390lfe.8.2019.01.26.05.11.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 Jan 2019 05:11:03 -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 v2] mtd: rawnand: fsmc: Reset NAND timings on resume() Date: Sat, 26 Jan 2019 14:10:55 +0100 Message-Id: <20190126131056.11364-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190126_051107_501041_C0715FBA X-CRM114-Status: GOOD ( 14.73 ) 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:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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_EF Message has a valid DKIM or DK signature from envelope-from domain 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 , Miquel Raynal 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 and other settings may have been lost so reset the chip to bring it up in a known working state. The FSMC only supports single CS chips so we only need to call nand_reset(chip, 0). Cc: Miquel Raynal Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Update commit message. --- drivers/mtd/nand/raw/fsmc_nand.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 ______________________________________________________ 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;