Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814282/?format=api
{ "id": 814282, "url": "http://patchwork.ozlabs.org/api/patches/814282/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20170915140411.31716-5-romain.izard.pro@gmail.com/", "project": { "id": 38, "url": "http://patchwork.ozlabs.org/api/projects/38/?format=api", "name": "Linux PWM development", "link_name": "linux-pwm", "list_id": "linux-pwm.vger.kernel.org", "list_email": "linux-pwm@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170915140411.31716-5-romain.izard.pro@gmail.com>", "list_archive_url": null, "date": "2017-09-15T14:04:06", "name": "[v2,4/9] 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": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20170915140411.31716-5-romain.izard.pro@gmail.com/mbox/", "series": [ { "id": 3315, "url": "http://patchwork.ozlabs.org/api/series/3315/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/list/?series=3315", "date": "2017-09-15T14:04:06", "name": "Various patches for SAMA5D2 backup mode", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/3315/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814282/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814282/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-pwm-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pwm-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"YxWca4af\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xtxxD6rJ9z9t2S\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 00:05:04 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751618AbdIOOFD (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 15 Sep 2017 10:05:03 -0400", "from mail-wm0-f68.google.com ([74.125.82.68]:33735 \"EHLO\n\tmail-wm0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751501AbdIOOFA (ORCPT\n\t<rfc822; linux-pwm@vger.kernel.org>); Fri, 15 Sep 2017 10:05:00 -0400", "by mail-wm0-f68.google.com with SMTP id 187so2895938wmn.0;\n\tFri, 15 Sep 2017 07:04:59 -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\t55sm1399225wrw.60.2017.09.15.07.04.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 15 Sep 2017 07:04:58 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=owFYxnK787Ud9TRMMs531N3In48svKrtFKwYj7nv/wc=;\n\tb=YxWca4afXXd++jaVBaAXFaVt91CHnKpKJ9pUKAST9NOd6Sj0u5NWVV0+UPh3wggxJ6\n\tVkXsqPT9nJ+EnFHRSARuMtR5C/p/lQRGB8eBvcfWd0THgyX6EIt0H+xr2tbiGbEilKix\n\tpfBA6iD9xDIxFkhE8D6jKCH7uR4CHmWlNqMaGvi+ZECuVV5UlPC/zxfsKMiMKdpoEDrl\n\tTSmTxw+qS/Ga6VIyX1jZ4iuBvAXa2x04g5tuOpfFK+53AczufHqa4WqVoHwz1MHHrEBy\n\t4oUVH5Raf81PqXadDFS/gGU+i/FGbHuUh9gBmRkWL5j9ANEjXXK54ib2Ld2GGXQAEvKe\n\tHzuw==", "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=KgQbO1zJOPEPh6IZJocP5xPG+irz0lh+I4cVuUHFNAinRboFKOyaV65D0ErBqZFGXz\n\tHsxBfIEnrb/dRRBO4QQljMnVMaRGqFlCthvlc0AveLsaVq1SqrNzyH0IXo1edH28iXE+\n\tsyUdSvfBYfz8GZuLjhcLRre7RFXH1r4U+7jukFh7Q0JLNONBZ96wCPzWuhW6VCYNQgfV\n\twJuene7JcPD2nXosmWQx36aGpr+0YvBfnKoy98cSs2Sbq0LhLLkKu7+OxBeDWgzRkM1F\n\tyA9+bRxT2CBWcILo7wBT+fxUJszmCy6veulx3SUvAV09wNEg8w1r5mayDs6Wi18Y5FSR\n\tYWSg==", "X-Gm-Message-State": "AHPjjUhT2PTnu4KJEVuUvo8BagKXtibz+IUOFyJKkogbHsp1yAcPVTK0\n\tg9G3hDr81hq1ccgZGuxZoKA=", "X-Google-Smtp-Source": "AOwi7QCNKS4lV/BQsBWIo0q3kBz4OTpfhHuaC03IOuO/Dq3FfZPOhELHDKF6UrUX3hx59KweFUKstQ==", "X-Received": "by 10.28.130.130 with SMTP id e124mr2671760wmd.75.1505484298568; \n\tFri, 15 Sep 2017 07:04:58 -0700 (PDT)", "From": "Romain Izard <romain.izard.pro@gmail.com>", "To": "Nicolas Ferre <nicolas.ferre@microchip.com>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.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\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>", "Cc": "linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tlinux-mtd@lists.infradead.org, linux-pwm@vger.kernel.org,\n\tlinux-serial@vger.kernel.org, linux-usb@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tRomain Izard <romain.izard.pro@gmail.com>", "Subject": "[PATCH v2 4/9] mtd: nand: atmel: Avoid ECC errors when leaving\n\tbackup mode", "Date": "Fri, 15 Sep 2017 16:04:06 +0200", "Message-Id": "<20170915140411.31716-5-romain.izard.pro@gmail.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20170915140411.31716-1-romain.izard.pro@gmail.com>", "References": "<20170915140411.31716-1-romain.izard.pro@gmail.com>", "Sender": "linux-pwm-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-pwm.vger.kernel.org>", "X-Mailing-List": "linux-pwm@vger.kernel.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": [ "v2", "4/9" ] }