From patchwork Thu Oct 9 19:06:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 5060751 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 07D9AC11AC for ; Thu, 9 Oct 2014 19:19:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 476F92022A for ; Thu, 9 Oct 2014 19:19:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B86B20222 for ; Thu, 9 Oct 2014 19:19: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 1XcJD0-0001wd-NW; Thu, 09 Oct 2014 19:17:06 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcJ8z-0006cw-T2 for linux-arm-kernel@bombadil.infradead.org; Thu, 09 Oct 2014 19:12:58 +0000 Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcJ8w-0000Mr-S8 for linux-arm-kernel@lists.infradead.org; Thu, 09 Oct 2014 19:12:56 +0000 Received: by mail-la0-f52.google.com with SMTP id hz20so1841152lab.25 for ; Thu, 09 Oct 2014 12:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=z617ysQciVyzcv1kkE//jHyOz2252r9/I0tMnZo+rbw=; b=eS/ezEthfQVIRMXzGM22eCoZuniOpCtbAVP7epGjaTMUokl2Q7oaRe/BB2rpSb2L88 hzyrkwk8Ld8WlOfhtOlsc3LYwIDAXNVVCsE9ftbkvnkjnZ3t3SForehozNUWoaZ7e0h9 jU5cTFAmNiXZtYDMQwIOC57ucNya7VMP9qDJngsAOeZNSENt9/ifweBWK9Eac0li7by4 ewXzesJ+SS38Mu/MDQOANZ/z/zFaRlMUEz71LaOb9u7Mqcqugq+q5JeapmMsQhFTCWFs 0Pnv/dynEFGRBVGxi8OyAp7Dv+SF6OUT3M36bGAejg9YbziOjIhxy6lQMGCEpENEzLiQ H2xQ== X-Received: by 10.112.149.36 with SMTP id tx4mr19956127lbb.79.1412881951134; Thu, 09 Oct 2014 12:12:31 -0700 (PDT) Received: from xi.terra (s83-177-171-8.cust.tele2.se. [83.177.171.8]) by mx.google.com with ESMTPSA id ld7sm1191611lac.23.2014.10.09.12.12.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Oct 2014 12:12:30 -0700 (PDT) X-Google-Original-Sender: Received: from johan by xi.terra with local (Exim 4.84) (envelope-from ) id 1XcJ5p-0006hr-42; Thu, 09 Oct 2014 21:09:41 +0200 From: Johan Hovold To: Alessandro Zummo , Tony Lindgren , =?UTF-8?q?Beno=C3=AEt=20Cousson?= Subject: [PATCH 10/12] rtc: omap: enable wake-up from power off Date: Thu, 9 Oct 2014 21:06:32 +0200 Message-Id: <1412881594-25678-11-git-send-email-johan@kernel.org> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1412881594-25678-1-git-send-email-johan@kernel.org> References: <1412881594-25678-1-git-send-email-johan@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141009_201254_985442_3C94FE4C X-CRM114-Status: GOOD ( 13.41 ) X-Spam-Score: -2.6 (--) Cc: devicetree@vger.kernel.org, rtc-linux@googlegroups.com, Colin Foe-Parker , Lokesh Vutla , j-keerthy@ti.com, nsekhar@ti.com, linux-kernel@vger.kernel.org, Felipe Balbi , Johan Hovold , t-kristo@ti.com, linux-arm-kernel@lists.infradead.org, AnilKumar Ch , Andrew Morton , linux-omap@vger.kernel.org, Guenter Roeck X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 The ALARM interrupt must not be disabled during shutdown in order to be able to power up the system using an RTC alarm. Signed-off-by: Johan Hovold Reviewed-by: Felipe Balbi --- drivers/rtc/rtc-omap.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index b0319864dd42..8836c58901b5 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -670,7 +670,15 @@ static SIMPLE_DEV_PM_OPS(omap_rtc_pm_ops, omap_rtc_suspend, omap_rtc_resume); static void omap_rtc_shutdown(struct platform_device *pdev) { - rtc_write(0, OMAP_RTC_INTERRUPTS_REG); + u8 mask; + + /* + * Keep the ALARM interrupt enabled to allow the system to power up on + * alarm events. + */ + mask = rtc_read(OMAP_RTC_INTERRUPTS_REG); + mask &= OMAP_RTC_INTERRUPTS_IT_ALARM; + rtc_write(mask, OMAP_RTC_INTERRUPTS_REG); } MODULE_ALIAS("platform:omap_rtc");