From patchwork Fri Sep 8 15:35:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Izard X-Patchwork-Id: 9944539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 737546035D for ; Fri, 8 Sep 2017 15:37:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63B8B20856 for ; Fri, 8 Sep 2017 15:37:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 586E428385; Fri, 8 Sep 2017 15:37:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E292127F8E for ; Fri, 8 Sep 2017 15:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=J+qUQhSD3zB/dLsziK9WKtqgGQZPGsgF2YTWhNA5D5g=; b=awYzlyLq6W/se2yB9ardMTcQ1F MQW9cjf0QDriwTi4/tCvhdoKk2DFTG+xklyQS637eJu3iHixd+liTwofT/1YNl6orxUeLCYeZ//o5 dRWkkEX87nl4DcnyeNT5uZASssk3E890OIASIXlwRKPjkK04oBXEdGqHT9NFHFi6KXFcH556++xvM Qk0bZyH3resZlCC6WRcsO3iT8LBA6eokVZjwF39VzOrAquFF5QlilbRtSUxwP+N8onY7YYiBqcgK7 VrmmcPIAp2f4jXbfEnxtr1Fhu3ZDtW7rHmpM/miHHJzB8GqdVxBn/LkyhlbUUrz0bhZ85RHPAqlYf dfKzscDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dqLLM-0006hW-I5; Fri, 08 Sep 2017 15:37:20 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dqLKf-00067I-OG; Fri, 08 Sep 2017 15:36:39 +0000 Received: by mail-wm0-x242.google.com with SMTP id e64so1985452wmi.2; Fri, 08 Sep 2017 08:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZgQ0/Qh5f5QbU+VDEqyOpLBz/AqelVRfzse4RDneeD4=; b=S9+gqD8ywuZrkquhxtNxPxC2dF60FByurSqd/JEorJgwWeR0ZdsKn6SfR6Yxo26hdn sw56JQ0fYCOJwlIxGl0vMM9IoUfgSEegnSkyK/6IYfzAMhiFzPdpu8NcvYxHTNmN7xuQ TelqixI+2vm+SY91GQ2dyfnSH19HihwFtRwzWQUFJEj9yNaN4nmHjtDyE3ijmzeb52wn W5W+9OJGYRvAyfs49Qs+LUjgN6M5gdqdDajc/l7jSeTftuKIcS9eRR1dBkw5HLdzXQwn 7x1pKfonOHCJjgQD4gyCGFM9wlKzmW56CoTg9Kn2pwi5WMkpe1gOO3bob3Zua3Hv3aL+ 4hGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZgQ0/Qh5f5QbU+VDEqyOpLBz/AqelVRfzse4RDneeD4=; b=TkWHRJQSO6LlQ6rLSidqC77N1uf3ZJ5I4l7fHoGMjLloCiTr8bj3CM4Rt2C30ikUam okID7GBUzAuRwG+I2qMj9aa5TDRi54r1n70AAGXOacjkthx0Xk3UAdA9O0vUGjrv4+Uu L0OqWo8uOMrxLhoa9KKk0NBz2MEvPGBRfJVWouWs2Fpsi3q7+BGhiL6InxM/DC9ZgBTc RA3NIvC2hTh85up6v6qqphiPv3nNZg7vQyFwIacjZ/46FaJSQTZAuieRrJ0UjhTPRo8R ZGc097Mu907v09l9qfw9nl8rHLEVW34hGdpkUZkIQmPwi6LnoeWcR6ZeRaSs5JvmqBuo PG0Q== X-Gm-Message-State: AHPjjUgntDfXsWUcZk5c2hRSdDoz/eocwUJectyKKi8ubMt1hVtf5JqC 9gACaWk4x0zj1dDU0QspAAA= X-Google-Smtp-Source: AOwi7QAJUrAv3VmrgsS9GWM3nQ91hzvUf/nafsaJvXRmJOvmW5HVsLSRX5hiHaU2NOmFJYEO3mWLgQ== X-Received: by 10.28.150.69 with SMTP id y66mr1902353wmd.8.1504884977199; Fri, 08 Sep 2017 08:36:17 -0700 (PDT) Received: from localhost.localdomain (146.187.3.109.rev.sfr.net. [109.3.187.146]) by smtp.gmail.com with ESMTPSA id p199sm1689224wmb.28.2017.09.08.08.36.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Sep 2017 08:36:16 -0700 (PDT) From: Romain Izard To: Nicolas Ferre , Boris Brezillon , Michael Turquette , Stephen Boyd , Ludovic Desroches , Jonathan Cameron , Wenyou Yang , Josh Wu , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , Thierry Reding , Richard Genoud , Greg Kroah-Hartman , Alan Stern Subject: [PATCH v1 02/10] clk: at91: pmc: Save SCSR during suspend Date: Fri, 8 Sep 2017 17:35:56 +0200 Message-Id: <20170908153604.28383-3-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_083637_957133_49914DCD X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, linux-iio@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-serial@vger.kernel.org, Romain Izard , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The contents of the System Clock Status Register (SCSR) needs to be restored into the System Clock Enable Register (SCER). As the bootloader will restore some clocks by itself, the issue can be missed as only the USB controller, the LCD controller, the Image Sensor controller and the programmable clocks will be impacted. Fix the obvious typo in the suspend/resume code, as the IMR register does not need to be saved twice. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre --- drivers/clk/at91/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index 5c2b26de303e..07dc2861ad3f 100644 --- a/drivers/clk/at91/pmc.c +++ b/drivers/clk/at91/pmc.c @@ -86,7 +86,7 @@ static int pmc_suspend(void) { int i; - regmap_read(pmcreg, AT91_PMC_IMR, &pmc_cache.scsr); + regmap_read(pmcreg, AT91_PMC_SCSR, &pmc_cache.scsr); regmap_read(pmcreg, AT91_PMC_PCSR, &pmc_cache.pcsr0); regmap_read(pmcreg, AT91_CKGR_UCKR, &pmc_cache.uckr); regmap_read(pmcreg, AT91_CKGR_MOR, &pmc_cache.mor); @@ -129,7 +129,7 @@ static void pmc_resume(void) if (pmc_cache.pllar != tmp) pr_warn("PLLAR was not configured properly by the firmware\n"); - regmap_write(pmcreg, AT91_PMC_IMR, pmc_cache.scsr); + regmap_write(pmcreg, AT91_PMC_SCER, pmc_cache.scsr); regmap_write(pmcreg, AT91_PMC_PCER, pmc_cache.pcsr0); regmap_write(pmcreg, AT91_CKGR_UCKR, pmc_cache.uckr); regmap_write(pmcreg, AT91_CKGR_MOR, pmc_cache.mor);