From patchwork Thu Mar 10 02:16:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 8553001 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6537EC0553 for ; Thu, 10 Mar 2016 02:30:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99729202B8 for ; Thu, 10 Mar 2016 02:30:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF57820259 for ; Thu, 10 Mar 2016 02:30:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1adqLH-0007Hr-Nx; Thu, 10 Mar 2016 02:28:47 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1adqAd-0002wh-Ue for linux-arm-kernel@lists.infradead.org; Thu, 10 Mar 2016 02:17:51 +0000 Received: from trochilidae.toradex.int (75-146-58-181-Washington.hfc.comcastbusiness.net [75.146.58.181]) by mail.kmu-office.ch (Postfix) with ESMTPSA id DDB9D5C1223; Thu, 10 Mar 2016 03:16:52 +0100 (CET) From: Stefan Agner To: shawnguo@kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org Subject: [PATCH 18/18] ARM: vf610: PM: enable SNVS access Date: Wed, 9 Mar 2016 18:16:59 -0800 Message-Id: <1457576219-7971-19-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.7.2 In-Reply-To: <1457576219-7971-1-git-send-email-stefan@agner.ch> References: <1457576219-7971-1-git-send-email-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1457576216; bh=jFtzMq5ioAT5isrCDwcTBEnm6gBRlvszpfJ3sY9gU/4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=tZnSt5JPLdjlxG/Jfwf8/sf4ei+s8fhRQjzWicxDfNOWIKsNkVfUD7ycH3vJMcH5jzhfhvfuAE+jnVxHyLHbOObmjfWE2XTpwmaqjA+TFjd54bFyx1t7e1ZVTdE9BQcylh5HO/TSTkYkKMDCyr2y2oUQYt4e+GFlPqLh33ckKzE= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160309_181748_577771_2B67FCB4 X-CRM114-Status: UNSURE ( 8.60 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, jason@lakedaemon.net, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, Stefan Agner , robh+dt@kernel.org, sergeimir@emcraft.com, kernel@pengutronix.de, galak@codeaurora.org, tglx@linutronix.de, 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Restore access to SNVS which seems to be done by the boot ROM on normal boot. This is required for RTC wakeup not ending up in a interrupt storm, since the SNVS RTC driver can not acknowledge the wakeup alarm without write access. Signed-off-by: Stefan Agner --- arch/arm/mach-imx/suspend-vf610.S | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-imx/suspend-vf610.S b/arch/arm/mach-imx/suspend-vf610.S index 09ad246..6df0622 100644 --- a/arch/arm/mach-imx/suspend-vf610.S +++ b/arch/arm/mach-imx/suspend-vf610.S @@ -429,6 +429,17 @@ ddrmc_initializing: ldr r5, =0x0 str r5, [r11, #VF610_GPC_LPMR] + /* Enable SNVS */ + ldr r3, [r0, #PM_INFO_VF610_CCM_P_OFFSET] + ldr r4, [r3, #VF610_CCM_CCGR6] + orr r4, r4, #0x0000C000 + str r4, [r3, #VF610_CCM_CCGR6] + + /* Enable SNVS access (RTC) */ + ldr r11, =0x400a7000 + ldr r4, =0x80000100 + str r4, [r11, #0x4] + /* get physical resume address from pm_info. */ ldr lr, [r0, #PM_INFO_RESUME_ADDR_OFFSET]