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: 811654 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LP1yHt3Z"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S9+gqD8y"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xphMV6Hkdz9sQl for ; Sat, 9 Sep 2017 01:37:28 +1000 (AEST) 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=927CygObMNPZC5b/NET7AspBUaPhMy+GY7yKWCI+pZE=; b=LP1yHt3Z3OPFvvdeYGBUf5QM7q uPvbEj7YGR8Ub4j2enkyUx+fJC1RIbNlhdo1msrzxfOjm4GB8dmYRt0Y2DjF4GZF7v2vUi8vejxMK YczBwAt2tpCxfhYIlZ9ZGyZjIglqeLyZb8V4FHV3pxXhsB7QsE4aCxDmHbi9hfWgwdAwUNTtACXHM BRMZTD/4lI3wTinRARfqnrxQj92t9OY1VR0uqvP56PiRoRO49O+6j7PFa+/EweSDS5i9zmG7toILt QSjb+Wk5h4P01hVRM5SjIKCNdg8lpEhN6b2cbJaSlXNJfrW2SuVK5NjYd6oXgCw1r1nFXQvJ6Rm/q L9Ge16wg==; 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 1dqLKi-0006B5-Nz; Fri, 08 Sep 2017 15:36:40 +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-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (romain.izard.pro[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list 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-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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);