Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811656/?format=api
{ "id": 811656, "url": "http://patchwork.ozlabs.org/api/patches/811656/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20170908153604.28383-5-romain.izard.pro@gmail.com/", "project": { "id": 3, "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api", "name": "Linux MTD development", "link_name": "linux-mtd", "list_id": "linux-mtd.lists.infradead.org", "list_email": "linux-mtd@lists.infradead.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170908153604.28383-5-romain.izard.pro@gmail.com>", "list_archive_url": null, "date": "2017-09-08T15:35:58", "name": "[v1,04/10] mtd: nand: atmel: Avoid ECC errors when leaving backup mode", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f92141d518e589c34ed4ec9a3dfc27daa659bde9", "submitter": { "id": 8236, "url": "http://patchwork.ozlabs.org/api/people/8236/?format=api", "name": "Romain Izard", "email": "romain.izard.pro@gmail.com" }, "delegate": { "id": 58324, "url": "http://patchwork.ozlabs.org/api/users/58324/?format=api", "username": "bbrezillon", "first_name": "Boris", "last_name": "Brezillon", "email": "boris.brezillon@free-electrons.com" }, "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20170908153604.28383-5-romain.izard.pro@gmail.com/mbox/", "series": [ { "id": 2239, "url": "http://patchwork.ozlabs.org/api/series/2239/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=2239", "date": "2017-09-08T15:35:55", "name": "Various patches for SAMA5D2 backup mode", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2239/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811656/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811656/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"Da3gyj6z\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"SYkaLzzz\"; dkim-atps=neutral" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xphPr0jN3z9t5q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 9 Sep 2017 01:41:36 +1000 (AEST)", "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqLPN-00028G-4H; Fri, 08 Sep 2017 15:41:29 +0000", "from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqLKl-00067a-FH; Fri, 08 Sep 2017 15:36:53 +0000", "by mail-wm0-x243.google.com with SMTP id p17so1980852wmd.3;\n\tFri, 08 Sep 2017 08:36:21 -0700 (PDT)", "from localhost.localdomain (146.187.3.109.rev.sfr.net.\n\t[109.3.187.146]) by smtp.gmail.com with ESMTPSA id\n\tp199sm1689224wmb.28.2017.09.08.08.36.19\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 08:36:20 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:\n\tIn-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=mb9niXxDvucXZK6J4fMkQbtGPzphSIX8W7Ss9xzNEmY=;\n\tb=Da3gyj6z7IAP+yKi4PrFQdOzHd\n\tUQch3P6IyCxATeSVPeDbs6apfSNCUrNGJRA4s5MyS6s4VwHlquHR5Uttvxo5kcmWXbaugaBL4tetL\n\tZC0ApULUa+bG5q8ImIAq04mOCBs8ljpT+fw03ufDe9ULzkV8g+BNfluG36qL0Qv1A+VPOj8N1WwGu\n\tPy/CIIJrpJzs8niBRW/GZ70IjzWTa8P87RyKHn0ZNX15iXmuIyzk0zcnyX7AkUHR+lrlZzuETLOFd\n\tiAAEIB9L+DXNNQhc+edzTzetNrIIVR30fv3v/g3OQxo4sKdz1OSfK6tfzzNnabQkwlvsCBVPBmXVk\n\tMZYzaUVQ==;", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=owFYxnK787Ud9TRMMs531N3In48svKrtFKwYj7nv/wc=;\n\tb=SYkaLzzzj42t5HwnrN5eSgC16ZyBITDEfWmxnYfpJYXZSyoBcKaZ5d34/7pCC4hkVz\n\t+dvB8S4lUzjTvaUjo28oZBqpr5A3Xg8hjojPadq+qaP/XcVYYkGxQzd8gHnLhXy2muId\n\tSks6k6SyOTRP/kQKKcc8y2E8Si+F7QFjfB6Klr3knUG/jahcCY4wD6CBX9Di1kjihyxD\n\tOaKBH0rfAQmbyp+JJS4PJ4nq0ZyGj/rJxBZn8PWWiZJ3LNnIIJI/djy0YXofMCg+K8oE\n\tQF/4ez+ia9TwrFgPpkAE4EBE7GO1U/xH1BqMaAWiAqcc1UP/7geQ+AyTa+cRoWGGjsFC\n\twvrw==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=owFYxnK787Ud9TRMMs531N3In48svKrtFKwYj7nv/wc=;\n\tb=eUZTnwW24eHtNQ2i+7bZwI4Vjl572AJYh3FBn8klQdw6RJimuTk9gI3fy+naNrNtWZ\n\tK8W7GATb6bB0TlvkVe2iChdbf7WcqQBSSqXVinWFIYKjeNM8xYLjWEh1gHXamOWbOEd+\n\tLjd7rciSARWp3DAyXT9OUvho4h3rLaOYmM76rMBDMzGIgpgTDhx/66gnpVrD+ON877JA\n\tGqDMXVpJUoLjQsQCVRTwxD6WVwxbfuGerGu4NPGqaJlDGLxcSR0e9wKlqD3BHPBOwTfR\n\t/1LpPWPWi7CYldRF/Zj5NMDscKMAMaSGADaLgGjH8QWwiO6XiR8CYt2FJ3npXg+2PNzz\n\tTPiQ==", "X-Gm-Message-State": "AHPjjUhlhUp/aSDAGfxRxnKh0nSBYEiCKhZqmRtBa7vjQFH9hMUI5iQ6\n\txbH/yBjDjS6HUQ==", "X-Google-Smtp-Source": "AOwi7QCmB90PGajvrxgyno2VImub4kajbKyF2GWBVPatSuwFadgLbD+aw60VWHb+Sa34/c73B1k9+g==", "X-Received": "by 10.28.136.11 with SMTP id k11mr97555wmd.133.1504884980591;\n\tFri, 08 Sep 2017 08:36:20 -0700 (PDT)", "From": "Romain Izard <romain.izard.pro@gmail.com>", "To": "Nicolas Ferre <nicolas.ferre@microchip.com>,\n\tBoris Brezillon <boris.brezillon@free-electrons.com>,\n\tMichael Turquette <mturquette@baylibre.com>,\n\tStephen Boyd <sboyd@codeaurora.org>,\n\tLudovic Desroches <ludovic.desroches@microchip.com>,\n\tJonathan Cameron <jic23@kernel.org>,\n\tWenyou Yang <wenyou.yang@atmel.com>, Josh Wu <rainyfeeling@outlook.com>,\n\tDavid Woodhouse <dwmw2@infradead.org>, \n\tBrian Norris <computersforpeace@gmail.com>,\n\tMarek Vasut <marek.vasut@gmail.com>,\n\tCyrille Pitchen <cyrille.pitchen@wedev4u.fr>,\n\tThierry Reding <thierry.reding@gmail.com>,\n\tRichard Genoud <richard.genoud@gmail.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tAlan Stern <stern@rowland.harvard.edu>", "Subject": "[PATCH v1 04/10] mtd: nand: atmel: Avoid ECC errors when leaving\n\tbackup mode", "Date": "Fri, 8 Sep 2017 17:35:58 +0200", "Message-Id": "<20170908153604.28383-5-romain.izard.pro@gmail.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20170908153604.28383-1-romain.izard.pro@gmail.com>", "References": "<20170908153604.28383-1-romain.izard.pro@gmail.com>", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20170908_083644_282884_092D017F ", "X-CRM114-Status": "GOOD ( 14.30 )", "X-Spam-Score": "-2.0 (--)", "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details: (-2.0 points)\n\tpts rule name description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2a00:1450:400c:c09:0:0:0:243 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (romain.izard.pro[at]gmail.com)\n\t-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain", "X-BeenThere": "linux-mtd@lists.infradead.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>", "List-Post": "<mailto:linux-mtd@lists.infradead.org>", "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>", "Cc": "linux-pwm@vger.kernel.org, linux-iio@vger.kernel.org,\n\tlinux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tlinux-mtd@lists.infradead.org, linux-serial@vger.kernel.org,\n\tRomain Izard <romain.izard.pro@gmail.com>, linux-clk@vger.kernel.org, \n\tlinux-arm-kernel@lists.infradead.org", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>", "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "During backup mode, the contents of all registers will be cleared as the\nSoC will be completely powered down. For a product that boots on NAND\nFlash memory, the bootloader will obviously use the related controller\nto read the Flash and correct any detected error in the memory, before\nhandling back control to the kernel's resuming entry point.\n\nIn normal devices, it is up to the driver's suspend/resume code to\nrestore the registers in a valid state. But the PMECC is not a regular\ndevice in the driver model when used with the legacy device tree binding\nfor the Atmel NAND controller, and suspend/resume code is not called.\n\nAs in my case the bootloader leaves the PMECC controller in a programmed\nstate, and the controller is only reset at boot or after a NAND access,\nthe first NAND Flash access with the Atmel controller will report\nuncorrectable ECC errors.\n\nTo avoid this, systematically reset the PMECC controller before using\nit.\n\nSigned-off-by: Romain Izard <romain.izard.pro@gmail.com>\n---\n drivers/mtd/nand/atmel/pmecc.c | 11 +++--------\n 1 file changed, 3 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c\nindex 8c210a5776bc..8d1208f38025 100644\n--- a/drivers/mtd/nand/atmel/pmecc.c\n+++ b/drivers/mtd/nand/atmel/pmecc.c\n@@ -777,6 +777,9 @@ int atmel_pmecc_enable(struct atmel_pmecc_user *user, int op)\n \n \tmutex_lock(&user->pmecc->lock);\n \n+\twritel(PMECC_CTRL_RST, pmecc->regs.base + ATMEL_PMECC_CTRL);\n+\twritel(PMECC_CTRL_DISABLE, pmecc->regs.base + ATMEL_PMECC_CTRL);\n+\n \tcfg = user->cache.cfg;\n \tif (op == NAND_ECC_WRITE)\n \t\tcfg |= PMECC_CFG_WRITE_OP;\n@@ -797,10 +800,6 @@ EXPORT_SYMBOL_GPL(atmel_pmecc_enable);\n \n void atmel_pmecc_disable(struct atmel_pmecc_user *user)\n {\n-\tstruct atmel_pmecc *pmecc = user->pmecc;\n-\n-\twritel(PMECC_CTRL_RST, pmecc->regs.base + ATMEL_PMECC_CTRL);\n-\twritel(PMECC_CTRL_DISABLE, pmecc->regs.base + ATMEL_PMECC_CTRL);\n \tmutex_unlock(&user->pmecc->lock);\n }\n EXPORT_SYMBOL_GPL(atmel_pmecc_disable);\n@@ -856,10 +855,6 @@ static struct atmel_pmecc *atmel_pmecc_create(struct platform_device *pdev,\n \t/* Disable all interrupts before registering the PMECC handler. */\n \twritel(0xffffffff, pmecc->regs.base + ATMEL_PMECC_IDR);\n \n-\t/* Reset the ECC engine */\n-\twritel(PMECC_CTRL_RST, pmecc->regs.base + ATMEL_PMECC_CTRL);\n-\twritel(PMECC_CTRL_DISABLE, pmecc->regs.base + ATMEL_PMECC_CTRL);\n-\n \treturn pmecc;\n }\n \n", "prefixes": [ "v1", "04/10" ] }