[{"id":1767828,"web_url":"http://patchwork.ozlabs.org/comment/1767828/","msgid":"<318420d4-044f-d018-f70e-3ed4fcfb0fd0@microchip.com>","list_archive_url":null,"date":"2017-09-13T12:10:41","subject":"Re: [PATCH v1 02/10] clk: at91: pmc: Save SCSR during suspend","submitter":{"id":71036,"url":"http://patchwork.ozlabs.org/api/people/71036/","name":"Nicolas Ferre","email":"nicolas.ferre@microchip.com"},"content":"On 08/09/2017 at 17:35, Romain Izard wrote:\n> The contents of the System Clock Status Register (SCSR) needs to be\n> restored into the System Clock Enable Register (SCER).\n> \n> As the bootloader will restore some clocks by itself, the issue can be\n> missed as only the USB controller, the LCD controller, the Image Sensor\n> controller and the programmable clocks will be impacted.\n> \n> Fix the obvious typo in the suspend/resume code, as the IMR register\n> does not need to be saved twice.\n> \n> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>\n\nYes, it looks like a typo:\nAcked-by: Nicolas Ferre <nicolas.ferre@microchip.com>\n\nI didn't experienced the issue with LCD nor USB though.\n\nRegards,\n\n> ---\n>  drivers/clk/at91/pmc.c | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c\n> index 5c2b26de303e..07dc2861ad3f 100644\n> --- a/drivers/clk/at91/pmc.c\n> +++ b/drivers/clk/at91/pmc.c\n> @@ -86,7 +86,7 @@ static int pmc_suspend(void)\n>  {\n>  \tint i;\n>  \n> -\tregmap_read(pmcreg, AT91_PMC_IMR, &pmc_cache.scsr);\n> +\tregmap_read(pmcreg, AT91_PMC_SCSR, &pmc_cache.scsr);\n>  \tregmap_read(pmcreg, AT91_PMC_PCSR, &pmc_cache.pcsr0);\n>  \tregmap_read(pmcreg, AT91_CKGR_UCKR, &pmc_cache.uckr);\n>  \tregmap_read(pmcreg, AT91_CKGR_MOR, &pmc_cache.mor);\n> @@ -129,7 +129,7 @@ static void pmc_resume(void)\n>  \tif (pmc_cache.pllar != tmp)\n>  \t\tpr_warn(\"PLLAR was not configured properly by the firmware\\n\");\n>  \n> -\tregmap_write(pmcreg, AT91_PMC_IMR, pmc_cache.scsr);\n> +\tregmap_write(pmcreg, AT91_PMC_SCER, pmc_cache.scsr);\n>  \tregmap_write(pmcreg, AT91_PMC_PCER, pmc_cache.pcsr0);\n>  \tregmap_write(pmcreg, AT91_CKGR_UCKR, pmc_cache.uckr);\n>  \tregmap_write(pmcreg, AT91_CKGR_MOR, pmc_cache.mor);\n>","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=\"YrAMS4St\"; \n\tdkim-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 3xsgTj05xpz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 22:10:17 +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 1ds6UT-0000QN-03; Wed, 13 Sep 2017 12:10:01 +0000","from esa5.microchip.iphmx.com ([216.71.150.166])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1ds6UQ-0000NP-Cc; Wed, 13 Sep 2017 12:10:00 +0000","from smtpout.microchip.com (HELO email.microchip.com)\n\t([198.175.253.82])\n\tby esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA;\n\t13 Sep 2017 05:09:34 -0700","from [10.159.245.112] (10.10.76.4) by chn-sv-exch06.mchp-main.com\n\t(10.10.76.107) with Microsoft SMTP Server id 14.3.352.0;\n\tWed, 13 Sep 2017 05:09:33 -0700"],"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:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=rX677cSQ2pan/TboMtrGMjttgrFEt6MtkzrzEfojLTA=;\n\tb=YrAMS4StAMB2nV\n\tLDXE59Js1pn/AHMBlMlRTN7WlbaZLV7LxmTs0PVfukPslDPAfE3/b+QrdArqI0mjvgzEI4RHkyc6/\n\txDG7+1wdVTnw4mM+i1p9D9F17yT7xEwH+8LQ/wnTzowLlgaYiu3mnFFypfn5jxLgatkngnHODwX/Q\n\tlCJMgNhwNAo6GiJmwEPJTvWaEJkK+OGb0xeV5t2wFQ5PQajWwo90th+sxJBB8H0RIqt5uSp7AJVnS\n\t1A2+LNiNOpuYa3bwKMnoonqJWvtoCJ/a4mmNaP57m5BLaM7+U+51N5ywRQk5t9OhF70jk97jdzul2\n\t/rNXJOFf7D8MgrW8GayQ==;","X-IronPort-AV":"E=Sophos;i=\"5.42,387,1500966000\"; d=\"scan'208\";a=\"4669448\"","Subject":"Re: [PATCH v1 02/10] clk: at91: pmc: Save SCSR during suspend","To":"Romain Izard <romain.izard.pro@gmail.com>, Boris Brezillon\n\t<boris.brezillon@free-electrons.com>, Michael Turquette\n\t<mturquette@baylibre.com>, Stephen Boyd <sboyd@codeaurora.org>, Ludovic\n\tDesroches <ludovic.desroches@microchip.com>, Jonathan Cameron\n\t<jic23@kernel.org>, Wenyou Yang <wenyou.yang@atmel.com>, Josh Wu\n\t<rainyfeeling@outlook.com>, David Woodhouse <dwmw2@infradead.org>, Brian\n\tNorris <computersforpeace@gmail.com>,\n\tMarek Vasut <marek.vasut@gmail.com>, \n\tCyrille Pitchen <cyrille.pitchen@wedev4u.fr>, Thierry Reding\n\t<thierry.reding@gmail.com>, Richard Genoud <richard.genoud@gmail.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>, Alan Stern\n\t<stern@rowland.harvard.edu>, Alexandre Belloni\n\t<alexandre.belloni@free-electrons.com>","References":"<20170908153604.28383-1-romain.izard.pro@gmail.com>\n\t<20170908153604.28383-3-romain.izard.pro@gmail.com>","From":"Nicolas Ferre <nicolas.ferre@microchip.com>","Organization":"microchip","Message-ID":"<318420d4-044f-d018-f70e-3ed4fcfb0fd0@microchip.com>","Date":"Wed, 13 Sep 2017 14:10:41 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170908153604.28383-3-romain.izard.pro@gmail.com>","Content-Language":"en-US","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170913_050958_489072_14562889 ","X-CRM114-Status":"GOOD (  13.97  )","X-Spam-Score":"-2.6 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.6 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow trust [216.71.150.166 listed in list.dnswl.org]","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\tlinux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org","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"}}]