From patchwork Mon Jun 18 09:29:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9384 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AB37323F19 for ; Mon, 18 Jun 2012 09:30:03 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 73FC3A181E4 for ; Mon, 18 Jun 2012 09:30:03 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so3902905yhp.11 for ; Mon, 18 Jun 2012 02:30:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=FowSSN+qvN37ITOusZS9ctRY0g20O425unIc1d1EGO8=; b=AIuHvHGIj55hX/rq1s9mMFHaLXOe664TaBXYhg13OMJCE7SIbAk6RdE3ZNMohBRTy1 U/wR2iUYvWyGjSczw+dIHdWTkRFkmQ8jsN7cMo6ncQdl2L17lhhqAPCyNpZp+1ywGcpt eQr3JxMaXqOnzEGPDfo+tvKc2yKM/5hD4RKruWuKCbsNfUjLUvkMJ+FzdehocvcLJIBt G9+8ygBeMJvpnkB2x36gSmIDXoweg0tyN62KKspnr7w5TZUadzXGHdshO68NwTgpPpPI c5+Awbhys+WYOSv9Qs7uVk9nyMJcxcfM1/NAed9ejiq2ZxKgQ+f8WHedXnRPLIOFXV6X gkVw== Received: by 10.50.87.227 with SMTP id bb3mr7634048igb.57.1340011803041; Mon, 18 Jun 2012 02:30:03 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp56554ibb; Mon, 18 Jun 2012 02:30:02 -0700 (PDT) Received: by 10.14.98.200 with SMTP id v48mr3183664eef.6.1340011801509; Mon, 18 Jun 2012 02:30:01 -0700 (PDT) Received: from eu1sys200aog102.obsmtp.com (eu1sys200aog102.obsmtp.com. [207.126.144.113]) by mx.google.com with SMTP id z15si8238157eef.34.2012.06.18.02.29.36 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jun 2012 02:30:01 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.113 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.113; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.113 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob102.postini.com ([207.126.147.11]) with SMTP ID DSNKT971ALCoFDdUvxos1O/t2IZaCaw/J+O+@postini.com; Mon, 18 Jun 2012 09:30:01 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8BCADE7; Mon, 18 Jun 2012 09:29:13 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3C207276E; Mon, 18 Jun 2012 09:29:13 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id B2BDBA8072; Mon, 18 Jun 2012 11:29:08 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 18 Jun 2012 11:29:12 +0200 From: Linus Walleij To: Andrew Morton Cc: Alessandro Zummo , , Mattias Wallin , Linus Walleij Subject: [PATCH 3/3] rtc: pl031: fix up IRQ flags Date: Mon, 18 Jun 2012 11:29:10 +0200 Message-ID: <1340011750-5113-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlbIgADZdmCX0O0T9sErtS7RjIfHUI+5Kb9IJkDLKZygVZqqrfnCVLTcjJd63zwNZZB58Tx From: Mattias Wallin The pl031 interrupt is shared between the timer part and the clockwatch part of the same HW block on the ux500, so mark it IRQF_SHARED on this variant. This patch also adds the IRQF_NO_SUSPEND flag to the rtc irq on all variants as we don't want this pretty important IRQ to be disabled in suspend. Signed-off-by: Mattias Wallin Reviewed-by: Rickard Andersson Reviewed-by: Jonas Aberg Signed-off-by: Linus Walleij --- drivers/rtc/rtc-pl031.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index e66afb8..08378e3 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -75,11 +75,13 @@ * clockwatch function * @st_weekday: if this is an ST Microelectronics silicon version that need * the weekday fix + * @irqflags: special IRQ flags per variant */ struct pl031_vendor_data { struct rtc_class_ops ops; bool clockwatch; bool st_weekday; + unsigned long irqflags; }; struct pl031_local { @@ -373,7 +375,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id) } if (request_irq(adev->irq[0], pl031_interrupt, - 0, "rtc-pl031", ldata)) { + vendor->irqflags, "rtc-pl031", ldata)) { ret = -EIO; goto out_no_irq; } @@ -403,6 +405,7 @@ static struct pl031_vendor_data arm_pl031 = { .set_alarm = pl031_set_alarm, .alarm_irq_enable = pl031_alarm_irq_enable, }, + .irqflags = IRQF_NO_SUSPEND, }; /* The First ST derivative */ @@ -416,6 +419,7 @@ static struct pl031_vendor_data stv1_pl031 = { }, .clockwatch = true, .st_weekday = true, + .irqflags = IRQF_NO_SUSPEND, }; /* And the second ST derivative */ @@ -429,6 +433,11 @@ static struct pl031_vendor_data stv2_pl031 = { }, .clockwatch = true, .st_weekday = true, + /* + * This variant shares the IRQ with another block and must not + * suspend that IRQ line. + */ + .irqflags = IRQF_SHARED | IRQF_NO_SUSPEND, }; static struct amba_id pl031_ids[] = {