From patchwork Thu Sep 11 13:18:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 388229 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ee0-x23e.google.com (mail-ee0-x23e.google.com [IPv6:2a00:1450:4013:c00::23e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5918714008B for ; Thu, 11 Sep 2014 23:21:41 +1000 (EST) Received: by mail-ee0-f62.google.com with SMTP id t10sf1659860eei.27 for ; Thu, 11 Sep 2014 06:21:38 -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=A1RASOzOyDDYM58RQG8Iiv2iw2XSSegZbzAR5JBIXPQ=; b=BBk9MZRFxwfeXo8AGZzzfdm97Zub60XVtbUNz4OdPc+2iAo/5u35na4CUuD6JeRj60 if09r3/Jy/FinJCoWapuahWW0DFQXYCerbFjoKJxpZxvRu1sDVB0PfedhTvB1z+oHnJH he/G9kaPbwnDBFh8HVYXCAxUeV1kmmD6IhEUljnemgbbgrzjPSxvL5X53OUZUwsjWfB2 0Q2B+8ksQxo+K7LAnuBPyfprNk9hbsQtBlSXhyExxq5MF2djpONb5YUq0YVNLIURhFZO FObR5IZQEFXYHEW8DxZWA/HYD+owIXwtGko6JtELANSTZYQ3x9tpawD45dqtpU+diYUC 2w1A== X-Received: by 10.152.243.11 with SMTP id wu11mr1594lac.27.1410441697663; Thu, 11 Sep 2014 06:21:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.152.45.104 with SMTP id l8ls59273lam.48.gmail; Thu, 11 Sep 2014 06:21:36 -0700 (PDT) X-Received: by 10.112.170.166 with SMTP id an6mr112068lbc.17.1410441696647; Thu, 11 Sep 2014 06:21:36 -0700 (PDT) Received: from mail.free-electrons.com (top.free-electrons.com. [176.31.233.9]) by gmr-mx.google.com with ESMTP id z15si84751wiv.3.2014.09.11.06.21.34 for ; Thu, 11 Sep 2014 06:21:34 -0700 (PDT) Received-SPF: none (google.com: boris.brezillon@free-electrons.com does not designate permitted sender hosts) client-ip=176.31.233.9; Received: by mail.free-electrons.com (Postfix, from userid 106) id 5A9E3813; Thu, 11 Sep 2014 15:21:35 +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 CE8418C6; Thu, 11 Sep 2014 15:18:50 +0200 (CEST) From: Boris BREZILLON To: Nicolas Ferre , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Andrew Victor , Alessandro Zummo , rtc-linux@googlegroups.com, 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 v4 1/9] rtc: at91sam9: remove references to mach specific headers Date: Thu, 11 Sep 2014 15:18:37 +0200 Message-Id: <1410441525-25258-2-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1410441525-25258-1-git-send-email-boris.brezillon@free-electrons.com> References: <1410441525-25258-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=neutral (google.com: boris.brezillon@free-electrons.com does not designate permitted sender hosts) 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 --- 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.