[{"id":1767826,"web_url":"http://patchwork.ozlabs.org/comment/1767826/","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-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>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsgTB56Q1z9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 22:09:50 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751829AbdIMMJs (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 13 Sep 2017 08:09:48 -0400","from esa5.microchip.iphmx.com ([216.71.150.166]:59734 \"EHLO\n\tesa5.microchip.iphmx.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751015AbdIMMJr (ORCPT\n\t<rfc822; linux-pwm@vger.kernel.org>); Wed, 13 Sep 2017 08:09:47 -0400","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"],"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>,\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>, Wenyou Yang <wenyou.yang@atmel.com>,\n\tJosh 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>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>","CC":"<linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>,\n\t<linux-iio@vger.kernel.org>, <linux-mtd@lists.infradead.org>,\n\t<linux-pwm@vger.kernel.org>, <linux-serial@vger.kernel.org>,\n\t<linux-usb@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>","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-Type":"text/plain; charset=\"utf-8\"","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Sender":"linux-pwm-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-pwm.vger.kernel.org>","X-Mailing-List":"linux-pwm@vger.kernel.org"}}]