Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814295/?format=api
{ "id": 814295, "url": "http://patchwork.ozlabs.org/api/patches/814295/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20170915140411.31716-4-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": "<20170915140411.31716-4-romain.izard.pro@gmail.com>", "list_archive_url": null, "date": "2017-09-15T14:04:05", "name": "[v2,3/9] clk: at91: pmc: Support backup for programmable clocks", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "3e25566e4e60d8b35d20cb04ed047026eb4b47b5", "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-mtd/patch/20170915140411.31716-4-romain.izard.pro@gmail.com/mbox/", "series": [ { "id": 3316, "url": "http://patchwork.ozlabs.org/api/series/3316/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=3316", "date": "2017-09-15T14:04:02", "name": "Various patches for SAMA5D2 backup mode", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/3316/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814295/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814295/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=\"iYAlvh69\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"juBwY/T+\"; 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 3xty0Q3ZmCz9s7m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 00:07:50 +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 1dsrHB-0006ct-5q; Fri, 15 Sep 2017 14:07:25 +0000", "from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dsrF8-0003nF-H9; Fri, 15 Sep 2017 14:05:25 +0000", "by mail-wr0-x242.google.com with SMTP id b9so1379974wra.0;\n\tFri, 15 Sep 2017 07:04:56 -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.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 15 Sep 2017 07:04:54 -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=wPA1Z1ozx4hi5J8alCsZhz8BG/eHi86GKhK0arj0DEk=;\n\tb=iYAlvh69wMbRrs3TGndp7KCTgM\n\tCtSKU0cSkiLcJa0ZO//+XQBrpPnTpnFAudfA8ZzfCzGQvPbmz4R12BtsNPDYwhbA+iXKLq3eMCkVs\n\tzS5dwtiRSKh4sINaGNN3aN+yYE1lTYXGg7DVgF9hNKD4BQbYBde+VpUsdL9RquvBvpkv8jk/SFIC5\n\tbl76vskDrvU57aR7hsUnngPYxDjmKc9+IL2qTvBg3eHKnm61BMwNlGWMzcbUr3zl4dneFrWkOglyh\n\tFf1AwtS2Aj3S9TphXh3mTIVdXsHbaoVqVeJ+gvKQ1Z0pbpE7zCxCQULl/N3ll61flYBFJEuVNw++z\n\tu0R4FCJg==;", "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=tcS6Herze/XO57KCIuaC04ZS3Cd91y6u2sAFJ0Y0QYc=;\n\tb=juBwY/T+1sZCvqvkfvLxBJvFOWd40tjGXaZi1QP6UEZ7XihOq3awXva745BYAnl6S1\n\tza6HmrH7esfL1xNR4UeB5ah0uKbFRip34RxtaFxrRoExUDXLOaZwbICCbZxchKnX/rVQ\n\tCyc6hW18SxyP076+bWcUi1RUiOXq2Hz2SpQn/e/0nat18/M9oqLoDUYekkgJaVfTaHr/\n\t1RVYpBm8S+GZOr04SRJ58HXaE82/Or13BmUPN9BoFn0+lkNYniU+PtQSGs4xGa89nh3z\n\tmCKyfkZMk0Te9OMdGFvtozWmk09YhAZmiNyWLlOKfRPb5+Cjlsm4j3FLyMy/412uVVF/\n\tAHeg==" ], "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=tcS6Herze/XO57KCIuaC04ZS3Cd91y6u2sAFJ0Y0QYc=;\n\tb=S8djAx2/KQUnM9KNDKRbc6XIqgnzuoBERDsMIAtuvP3/bWAJqHyqplTH/tJHUv5DpR\n\t/Q6zCTmo8/AlJQ3f2RAN75RSg97eLpMdurqpm8cMwik62Ciquqo+W0AcsRBmmgFHIP21\n\t1iDJ+9rkjfQ33zBQ7rH+SRe+PQwRX/AWDflKIIHE0Nh2VlQMdpzNDOyeRIuX+1cr2f94\n\toSpVY7oxyzF6XSapo9REkkbTQVvKmOj4aqI/weAxwTb+oIcWe1WWdUEH+x3KIAV77QoV\n\t51XUY5woneKd+Ha4NvwAAGEVOY6d1DtNmhMPHbmrmvlxvcYJbc9uvZCMY0wURwZa0uoI\n\tHgmQ==", "X-Gm-Message-State": "AHPjjUgQzDAYJOJbIQzLMtszt6OkLQRY6rdEuqSD02RD0OELKS9s7R+B\n\tdjGkOw++SvLNIg==", "X-Google-Smtp-Source": "ADKCNb7vZvs7t42OlzdTuEKE7RoeAicJOZpG8jluqnP2AmAADxLIQUkMncYgW6RKRl4mrb33pibNoQ==", "X-Received": "by 10.223.164.13 with SMTP id d13mr23475824wra.48.1505484294860; \n\tFri, 15 Sep 2017 07:04:54 -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>", "Subject": "[PATCH v2 3/9] clk: at91: pmc: Support backup for programmable\n\tclocks", "Date": "Fri, 15 Sep 2017 16:04:05 +0200", "Message-Id": "<20170915140411.31716-4-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>", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20170915_070522_605382_6F4AB6A6 ", "X-CRM114-Status": "GOOD ( 13.58 )", "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:c0c:0:0:0:242 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-usb@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,\n\tlinux-serial@vger.kernel.org,\n\tRomain Izard <romain.izard@mobile-devices.fr>, \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": "From: Romain Izard <romain.izard@mobile-devices.fr>\n\nWhen an AT91 programmable clock is declared in the device tree, register\nit into the Power Management Controller driver. On entering suspend mode,\nthe driver saves and restores the Programmable Clock registers to support\nthe backup mode for these clocks.\n\nSigned-off-by: Romain Izard <romain.izard.pro@gmail.com>\n---\nChanges in v2:\n* register PCKs on clock startup\n\n drivers/clk/at91/clk-programmable.c | 2 ++\n drivers/clk/at91/pmc.c | 27 +++++++++++++++++++++++++++\n drivers/clk/at91/pmc.h | 2 ++\n 3 files changed, 31 insertions(+)", "diff": "diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c\nindex 85a449cf61e3..0e6aab1252fc 100644\n--- a/drivers/clk/at91/clk-programmable.c\n+++ b/drivers/clk/at91/clk-programmable.c\n@@ -204,6 +204,8 @@ at91_clk_register_programmable(struct regmap *regmap,\n \tif (ret) {\n \t\tkfree(prog);\n \t\thw = ERR_PTR(ret);\n+\t} else {\n+\t\tpmc_register_pck(id);\n \t}\n \n \treturn hw;\ndiff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c\nindex 07dc2861ad3f..3910b7537152 100644\n--- a/drivers/clk/at91/pmc.c\n+++ b/drivers/clk/at91/pmc.c\n@@ -22,6 +22,7 @@\n #include \"pmc.h\"\n \n #define PMC_MAX_IDS 128\n+#define PMC_MAX_PCKS 8\n \n int of_at91_get_clk_range(struct device_node *np, const char *propname,\n \t\t\t struct clk_range *range)\n@@ -50,6 +51,7 @@ EXPORT_SYMBOL_GPL(of_at91_get_clk_range);\n static struct regmap *pmcreg;\n \n static u8 registered_ids[PMC_MAX_IDS];\n+static u8 registered_pcks[PMC_MAX_PCKS];\n \n static struct\n {\n@@ -66,8 +68,10 @@ static struct\n \tu32 pcr[PMC_MAX_IDS];\n \tu32 audio_pll0;\n \tu32 audio_pll1;\n+\tu32 pckr[PMC_MAX_PCKS];\n } pmc_cache;\n \n+/* Clock ID 0 is invalid */\n void pmc_register_id(u8 id)\n {\n \tint i;\n@@ -82,6 +86,21 @@ void pmc_register_id(u8 id)\n \t}\n }\n \n+/* Programmable Clock 0 is valid */\n+void pmc_register_pck(u8 pck)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < PMC_MAX_PCKS; i++) {\n+\t\tif (registered_pcks[i] == 0) {\n+\t\t\tregistered_pcks[i] = pck + 1;\n+\t\t\tbreak;\n+\t\t}\n+\t\tif (registered_pcks[i] == (pck + 1))\n+\t\t\tbreak;\n+\t}\n+}\n+\n static int pmc_suspend(void)\n {\n \tint i;\n@@ -103,6 +122,10 @@ static int pmc_suspend(void)\n \t\tregmap_read(pmcreg, AT91_PMC_PCR,\n \t\t\t &pmc_cache.pcr[registered_ids[i]]);\n \t}\n+\tfor (i = 0; registered_pcks[i]; i++) {\n+\t\tu8 num = registered_pcks[i] - 1;\n+\t\tregmap_read(pmcreg, AT91_PMC_PCKR(num), &pmc_cache.pckr[num]);\n+\t}\n \n \treturn 0;\n }\n@@ -143,6 +166,10 @@ static void pmc_resume(void)\n \t\t\t pmc_cache.pcr[registered_ids[i]] |\n \t\t\t AT91_PMC_PCR_CMD);\n \t}\n+\tfor (i = 0; registered_pcks[i]; i++) {\n+\t\tu8 num = registered_pcks[i] - 1;\n+\t\tregmap_write(pmcreg, AT91_PMC_PCKR(num), pmc_cache.pckr[num]);\n+\t}\n \n \tif (pmc_cache.uckr & AT91_PMC_UPLLEN)\n \t\tmask |= AT91_PMC_LOCKU;\ndiff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h\nindex 858e8ef7e8db..d22b1fa9ecdc 100644\n--- a/drivers/clk/at91/pmc.h\n+++ b/drivers/clk/at91/pmc.h\n@@ -31,8 +31,10 @@ int of_at91_get_clk_range(struct device_node *np, const char *propname,\n \n #ifdef CONFIG_PM\n void pmc_register_id(u8 id);\n+void pmc_register_pck(u8 pck);\n #else\n static inline void pmc_register_id(u8 id) {}\n+static inline void pmc_register_pck(u8 pck) {}\n #endif\n \n #endif /* __PMC_H_ */\n", "prefixes": [ "v2", "3/9" ] }