From patchwork Thu May 23 08:38:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2605661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id EF61A40077 for ; Thu, 23 May 2013 08:45:46 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UfR9S-0007u9-R2; Thu, 23 May 2013 08:45:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UfR4X-0004ra-6Y; Thu, 23 May 2013 08:40:29 +0000 Received: from mail-lb0-f179.google.com ([209.85.217.179]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UfR3v-0004n8-0i for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2013 08:39:53 +0000 Received: by mail-lb0-f179.google.com with SMTP id r11so3096428lbv.10 for ; Thu, 23 May 2013 01:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=7eX58N/hn/BAl3OPnDPXpf0kTy8wppFyfUs5G2QZb2k=; b=GSZo+FO98pMnVp4fJlToXJ/b5peNaZ4N3TtL2oQEC+4lMWkOMQO++xx6zZXi8JD11x BBQQgeBQ2tvfU669RBlYsNqosgAGFTpOCWVH+iuVtYxO7vJUbVOseca5HGTyUVHpGrP6 CYXvjFslb/i/mbWLBcq+3E4dTAssAwBaK8Fn8kv3j4xIPgMzVkW3Cp4eVHlTwsAj2+Vm 9JuXgMsj5t/Wm4zbOw8s7xEY6U7Y4vAjkl7jQYMQIxbOFAgNzBZl4YF7XpEINbcmErS+ /tJJoWMRm0Ru7WZrqC9ZGW5cM/B1uhbpLyFwwuA5xN3VG/FghmKjMdBpQbs96qwaoah2 6YFw== X-Received: by 10.152.22.73 with SMTP id b9mr5898479laf.36.1369298368108; Thu, 23 May 2013 01:39:28 -0700 (PDT) Received: from omicron.terra (s83-180-236-44.cust.tele2.se. [83.180.236.44]) by mx.google.com with ESMTPSA id n7sm4319039lbd.12.2013.05.23.01.39.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 23 May 2013 01:39:26 -0700 (PDT) Received: from johan by omicron.terra with local (Exim 4.80.1) (envelope-from ) id 1UfR3R-0006Q9-4y; Thu, 23 May 2013 10:39:21 +0200 From: Johan Hovold To: Nicolas Ferre Subject: [PATCH v3 5/5] rtc-at91rm9200: use shadow IMR on at91sam9x5 Date: Thu, 23 May 2013 10:38:55 +0200 Message-Id: <1369298335-24597-6-git-send-email-jhovold@gmail.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1369298335-24597-1-git-send-email-jhovold@gmail.com> References: <1364983415-20298-1-git-send-email-jhovold@gmail.com> <1369298335-24597-1-git-send-email-jhovold@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130523_043951_345609_3A926F3C X-CRM114-Status: GOOD ( 12.07 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.179 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jhovold[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Johan Hovold , Douglas Gilbert , linux-kernel@vger.kernel.org, Ludovic Desroches , Robert Nelson , Jean-Christophe PLAGNIOL-VILLARD , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 Add support for the at91sam9x5-family which must use the shadow interrupt mask due to a hardware issue (causing RTC_IMR to always be zero). Signed-off-by: Johan Hovold --- Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt | 2 +- arch/arm/boot/dts/at91sam9x5.dtsi | 2 +- drivers/rtc/rtc-at91rm9200.c | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt index 2a3feab..34c1505 100644 --- a/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt +++ b/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt @@ -1,7 +1,7 @@ Atmel AT91RM9200 Real Time Clock Required properties: -- compatible: should be: "atmel,at91rm9200-rtc" +- compatible: should be: "atmel,at91rm9200-rtc" or "atmel,at91sam9x5-rtc" - reg: physical base address of the controller and length of memory mapped region. - interrupts: rtc alarm/event interrupt diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 1145ac3..b5833d1f 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi @@ -643,7 +643,7 @@ }; rtc@fffffeb0 { - compatible = "atmel,at91rm9200-rtc"; + compatible = "atmel,at91sam9x5-rtc"; reg = <0xfffffeb0 0x40>; interrupts = <1 4 7>; status = "disabled"; diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index 205701e..47416e9 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -309,12 +309,19 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id) static const struct at91_rtc_config at91rm9200_config = { }; +static const struct at91_rtc_config at91sam9x5_config = { + .use_shadow_imr = true, +}; + #ifdef CONFIG_OF static const struct of_device_id at91_rtc_dt_ids[] = { { .compatible = "atmel,at91rm9200-rtc", .data = &at91rm9200_config, }, { + .compatible = "atmel,at91sam9x5-rtc", + .data = &at91sam9x5_config, + }, { /* sentinel */ } };