From patchwork Tue Sep 9 09:30:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 387218 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-la0-x23d.google.com (mail-la0-x23d.google.com [IPv6:2a00:1450:4010:c03::23d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A52AB14018C for ; Tue, 9 Sep 2014 19:30:49 +1000 (EST) Received: by mail-la0-f61.google.com with SMTP id s18sf700182lam.6 for ; Tue, 09 Sep 2014 02:30:45 -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=eOTO9nZc5IgORi4y230c12IeCwdk4mJvtuuepEmtn2E=; b=fS3CyxK3/ZoNV89f6ZpwUQL8IS/U3lUKOszDFl4f3E7n0oYrTLGUxNvwsfUtqrZDfU 5r68J4W4KyacxaEe5iDKTJDAFocy82T5efgnbmgkfv22IhUkt4AN46pzJ4n4n6PZS6xB +0tpLKxA6MpscPNp3X4sFlBuRuRLKUQVQdKCDxOYU+mLQtK9qkKKdGXqmZdlrdZWVCrO Eo8k0GgINHCjELflA/PqOOi44B7YeCqCA7Yd6ZU6FL24bZujdW//e0rEyVT4uDe87KuQ O1DcI6Qw2YFCjltZFSarAvA7qPzKBgIip27XZFAKyelIjJleUEv4N+S00fjH8KQ5FVTP iNEg== X-Received: by 10.180.11.9 with SMTP id m9mr134612wib.1.1410255045089; Tue, 09 Sep 2014 02:30:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.180.103.225 with SMTP id fz1ls478826wib.44.canary; Tue, 09 Sep 2014 02:30:44 -0700 (PDT) X-Received: by 10.180.221.169 with SMTP id qf9mr2564772wic.5.1410255044734; Tue, 09 Sep 2014 02:30:44 -0700 (PDT) Received: from mail.free-electrons.com (top.free-electrons.com. [176.31.233.9]) by gmr-mx.google.com with ESMTP id j12si778673wie.2.2014.09.09.02.30.44 for ; Tue, 09 Sep 2014 02:30:44 -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 626B0E6D; Tue, 9 Sep 2014 11:30:44 +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 80C01E6C; Tue, 9 Sep 2014 11:30:43 +0200 (CEST) From: Boris BREZILLON To: Nicolas Ferre , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Andrew Victor , Alessandro Zummo , rtc-linux@googlegroups.com 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 v2 1/6] rtc: at91sam9: remove references to mach specific headers Date: Tue, 9 Sep 2014 11:30:30 +0200 Message-Id: <1410255035-26775-2-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1410255035-26775-1-git-send-email-boris.brezillon@free-electrons.com> References: <1410255035-26775-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 --- 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.