From patchwork Tue Sep 23 11:23:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 392413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-lb0-x239.google.com (mail-lb0-x239.google.com [IPv6:2a00:1450:4010:c04::239]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 340711400BE for ; Tue, 23 Sep 2014 21:24:21 +1000 (EST) Received: by mail-lb0-f185.google.com with SMTP id b12sf625437lbj.12 for ; Tue, 23 Sep 2014 04:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=bl+Ciejs67rDLJ6SR9G+5v7T+dhtDO4dMgjckMKrQd8=; b=B2OSCjDG8HwNJzfj9sTHqRyg4qk1bCNC4Diyh3u/YlU7sRPmyAzESSZzZQPoAY2bCG k7iJDZjWPO7cQ3457nygCF/20USoiplABzTVSOkkwGDLzmZOj/JLGgJfsgWWFWFEm0pj yOa4AVo7zDJQ9xPlup8mTLEnJAtxyUHYLGH2htZjIgugzAPshMrhLH+al6QmHEAUbGFb +TMuK42bHjnMLleu6OWwukGxVCiRiyCWbBTcwceyngpiI6qDMsxCyoLkb3DfN92dCdvA Svr85Johuy3d4cuGTM1XpBdvEE8BjbMjV3X471lF3xZlhc5e3tCPwvqgViiAs0ONMTAN bF0g== X-Received: by 10.180.107.99 with SMTP id hb3mr96142wib.13.1411471459065; Tue, 23 Sep 2014 04:24:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.180.100.200 with SMTP id fa8ls594978wib.19.canary; Tue, 23 Sep 2014 04:24:18 -0700 (PDT) X-Received: by 10.180.24.225 with SMTP id x1mr2920268wif.2.1411471458769; Tue, 23 Sep 2014 04:24:18 -0700 (PDT) Received: from mail.free-electrons.com (top.free-electrons.com. [176.31.233.9]) by gmr-mx.google.com with ESMTP id go4si95195wib.3.2014.09.23.04.24.18 for ; Tue, 23 Sep 2014 04:24:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning boris.brezillon@free-electrons.com does not designate 176.31.233.9 as permitted sender) client-ip=176.31.233.9; Received: by mail.free-electrons.com (Postfix, from userid 106) id DB09873D; Tue, 23 Sep 2014 13:24:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id B71F86A0; Tue, 23 Sep 2014 13:24:17 +0200 (CEST) From: Boris BREZILLON To: Nicolas Ferre , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Andrew Victor , Alessandro Zummo , rtc-linux@googlegroups.com, Samuel Ortiz , Lee Jones , Johan Hovold Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Boris BREZILLON Subject: [rtc-linux] [PATCH v8 01/10] rtc: at91sam9: remove references to mach specific headers Date: Tue, 23 Sep 2014 13:23:55 +0200 Message-Id: <1411471444-2764-2-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411471444-2764-1-git-send-email-boris.brezillon@free-electrons.com> References: <1411471444-2764-1-git-send-email-boris.brezillon@free-electrons.com> X-Original-Sender: boris.brezillon@free-electrons.com X-Original-Authentication-Results: gmr-mx.google.com; spf=softfail (google.com: domain of transitioning boris.brezillon@free-electrons.com does not designate 176.31.233.9 as permitted sender) smtp.mail=boris.brezillon@free-electrons.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , In order to support multi platform kernel drivers should not include machine specific headers. Copy RTT macros in the driver code and remove any machine specific headers. Signed-off-by: Boris BREZILLON Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre Acked-by: Johan Hovold --- drivers/rtc/rtc-at91sam9.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 5963743..51f0038 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c @@ -22,10 +22,6 @@ #include #include -#include -#include -#include - /* * This driver uses two configurable hardware resources that live in the * AT91SAM9 backup power domain (intended to be powered at all times) @@ -47,6 +43,24 @@ * registers available, likewise usable for more than "RTC" support. */ +#define AT91_RTT_MR 0x00 /* Real-time Mode Register */ +#define AT91_RTT_RTPRES (0xffff << 0) /* Real-time Timer Prescaler Value */ +#define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */ +#define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */ +#define AT91_RTT_RTTRST (1 << 18) /* Real Time Timer Restart */ + +#define AT91_RTT_AR 0x04 /* Real-time Alarm Register */ +#define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */ + +#define AT91_RTT_VR 0x08 /* Real-time Value Register */ +#define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */ + +#define AT91_RTT_SR 0x0c /* Real-time Status Register */ +#define AT91_RTT_ALMS (1 << 0) /* Real-time Alarm Status */ +#define AT91_RTT_RTTINC (1 << 1) /* Real-time Timer Increment */ + +#define AT91_SLOW_CLOCK 32768 + /* * We store ALARM_DISABLED in ALMV to record that no alarm is set. * It's also the reset value for that field.