From patchwork Thu Jan 29 11:51:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Cvek X-Patchwork-Id: 5741871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E10599F36E for ; Thu, 29 Jan 2015 11:52:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 370F42024F for ; Thu, 29 Jan 2015 11:52:09 +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 68245201F4 for ; Thu, 29 Jan 2015 11:52:08 +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 1YGncP-0002Yd-Vy; Thu, 29 Jan 2015 11:50:41 +0000 Received: from bubo.tul.cz ([2001:718:1c01:16::aa]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YGncN-0002Sh-6e for linux-arm-kernel@lists.infradead.org; Thu, 29 Jan 2015 11:50:39 +0000 Received: from [78.80.185.17] (78-80-185-17.tmcz.cz [78.80.185.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by bubo.tul.cz (Postfix) with ESMTPSA id AD9F41F0005; Thu, 29 Jan 2015 12:50:07 +0100 (CET) Message-ID: <54CA1ECA.8050000@tul.cz> Date: Thu, 29 Jan 2015 12:51:38 +0100 From: Petr Cvek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131204 Thunderbird/17.0.11 MIME-Version: 1.0 To: a.zummo@towertech.it, rtc-linux@googlegroups.com, linux-arm-kernel@lists.infradead.org, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr Subject: [PATCH v2] RTC: PXA: Fix regression of interrupt before ioremap X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150129_035039_422442_8CF68552 X-CRM114-Status: GOOD ( 10.72 ) X-Spam-Score: -0.0 (/) 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: , 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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 Interrupts appear before register set of the PXA2xx RTC controller is ioremaped. This fixes regression from: 'commit a44802f8fb7e593adabc6ef53c8df45a1717fa9b ("drivers/rtc/rtc-pxa.c: fix alarm can't wake up system issue")' 'commit 2f6e5f9458646263d3d9ffadd5e11e3d8d15a7d0 ("drivers/rtc: remove IRQF_DISABLED")' Signed-off-by: Petr Cvek --- drivers/rtc/rtc-pxa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index 4561f37..d7d83e5 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c @@ -346,7 +346,7 @@ static int __init pxa_rtc_probe(struct platform_device *pdev) dev_err(dev, "No alarm IRQ resource defined\n"); return -ENXIO; } - pxa_rtc_open(dev); + pxa_rtc->base = devm_ioremap(dev, pxa_rtc->ress->start, resource_size(pxa_rtc->ress)); if (!pxa_rtc->base) { @@ -375,6 +375,10 @@ static int __init pxa_rtc_probe(struct platform_device *pdev) return ret; } + ret = pxa_rtc_open(dev); + if (ret) + return ret; + device_init_wakeup(dev, 1); return 0;